Alright i am new to scripting and this is my first custom story. In my first room, im trying to make a door open as soon as a person walks into a script area right in front of the door.
however im getting these errors:
main (3,1) : INFO : Compiling void OnStart()
main (16,6) : RR : Expected "("
Here is my script so far:
////////////////////////////
// Run first time starting map
void OnStart()
{
//Add the Lantern and 10 Tinderboxes when in Debug mode
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("potion_oil_large_"+i, "potion_oil_large.ent");
} for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
//Door opens by itself when moving into Trigger_Area1
{
AddEntityCollideCallback("Player", "ScriptArea1", "Collide_Area", true, 1);
}
void Collide_Area(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("prison_1", false, true);
SetSwingDoorDisableAutoClose("prison_1", true);
AddPropImpulse("prison_1", 900.0f, 0.0f, 0.0f, "");
}
}