02-14-2014, 01:05 AM
Hi there, I have made my first custom story, the map is working fine. I have a line of commands for a key and door which worked at first, now i have added a jumpscare which i have seen in a tutorial on youtube. It crashes immediatly and says: main 14,19 EXPECTED IDENTIFIER. I can also give a screenshot of the code in notepad ++, private message me.
My codes are:
Is there anyone who understands the scripting better than me and can help me out? Thank you!!!
My codes are:
PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player", "Teleport_Script_1", "jumpscare", true, 1);
}
void jumpscare(string &in asParent, string &in asChild, int alStates)
{
SetEntityActive("corpse_male_3", true);
AddPropForce("corpse_male_3", 0, 0, 100, "world");
}
AddUseItemCallback(" ", "key_tower_1", "castle_1", "KeyOnDoor", true);
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("key_tower_1");
}
void OnStart()
{
AddEntityCollideCallback("Player", "Teleport_Script_1", "jumpscare", true, 1);
}
void jumpscare(string &in asParent, string &in asChild, int alStates)
{
SetEntityActive("corpse_male_3", true);
AddPropForce("corpse_male_3", 0, 0, 100, "world");
}
Is there anyone who understands the scripting better than me and can help me out? Thank you!!!