HELP!
i am making a new custom story and i am naming it "Forever" i am having troubles with scripting, though,
here is what i have in there,
////////////////////////////
//Run when starting map
void OnStart()
{
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
}
void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("boom", 0);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
AddUseItemCallback("", "key", "Locked Door", "KeyOnDoor", true);
}
{
SetSwingDoorLocked("Locked Door", false, true);
PlaySoundEntity("", "unlock_door", "Locked Door", 0, false);
RemoveItem("key");
}
///////////////////////////////
// Run when entering map
void OnEnter()
{
}
//////////////////////////////
// Run when leaving map
void OnLeave()
{
}
,everytime i go in the game it says "unexpected token "{"
any revisions would be greatly appreciated, and hopefully i will figure everything out from there.
thanks, bye.
|