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
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Teleporting naked guys

I don't see anything wrong Sad are you completely sure the teleporting naked guy is the problem?

Also, this is technical support. This should be in development support, there is where people try to fix things.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 09-27-2012, 03:11 PM by The chaser.)
09-27-2012, 03:07 PM
Find
Vic7im Offline
Junior Member

Posts: 44
Threads: 9
Joined: Sep 2012
Reputation: 3
#3
RE: Teleporting naked guys

There's a " missing somewhere, check again.
09-27-2012, 03:26 PM
Find
Mooserider Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2011
Reputation: 2
#4
RE: Teleporting naked guys

PHP Code: (Select All)
void DoorLockedPlayer(string &in entity)

{
    if(
GetSwingDoorLocked("bedroomdoor1") == true)
    {
        
SetMessage("Messages""msgname"0);
    } 

It's nothing to do with the flying Jesus, you need another "}" on a new line after that. Should be:

PHP Code: (Select All)
void DoorLockedPlayer(string &in entity)

{
    if(
GetSwingDoorLocked("bedroomdoor1") == true)
    {
        
SetMessage("Messages""msgname"0);
    }



...Although I'd like to quietly suggest that you don't use teleporting naked guys, and instead use build-up and atmosphere. They're kinda infamous.
But hey, if you'd prefer to do that, go ahead.

Working on a FC: "Don't Let Go "
09-27-2012, 04:07 PM
Find




Users browsing this thread: 1 Guest(s)