The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Teleporting naked guys
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#1
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()
{

}

09-27-2012, 02:00 PM
Find


Messages In This Thread
Teleporting naked guys - by Storfigge - 09-27-2012, 02:00 PM
RE: Teleporting naked guys - by The chaser - 09-27-2012, 03:07 PM
RE: Teleporting naked guys - by Vic7im - 09-27-2012, 03:26 PM
RE: Teleporting naked guys - by Mooserider - 09-27-2012, 04:07 PM



Users browsing this thread: 1 Guest(s)