Teleporting naked guys
Hey!
So I've tried to create a teleporting naked guy but I've run into a problem.
When I load my map it says "Unexpected end of file". I have no clue of what I'm doing wrong :/
Here's the code I have written so far, the bold text is the teleporting naked guy:
/////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key1", "bedroomdoor1", "UsedKeyOnDoor1", true);
AddUseItemCallback("", "key2", "bedroomdoor2", "UsedKeyOnDoor2", true);
AddEntityCollideCallback("Player", "TP_Script_1", "Tp_Jesus", true, 1);
}
void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("bedroomdoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroomdoor1", 0, false);
RemoveItem("key1");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("bedroomdoor2", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroomdoor2", 0, false);
RemoveItem("key2");
}
void DoorLockedPlayer(string &in entity)
{
if(GetSwingDoorLocked("bedroomdoor1") == true)
{
SetMessage("Messages", "msgname", 0);
}
void Tp_Jesus(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Tp_Naked_1", true);
AddPropForce("Tp_Naked_1", 0, 0, -10000, "World");
}
/////////////////////////////
// Run when entering map
void OnEnter()
{
}
/////////////////////////////
// Run when leaving map
void OnLeave()
{
}
|