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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level door
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#7
RE: Level door

(05-07-2011, 12:41 AM)dragonlordsd Wrote: Umm... why are you teleporting the player to change maps? Doesn't the door just automatically link to the next map?

Yeah, it does.

I see your mistake, you added a interact callback; that means that when ever the player touches the door, he teleports.
void OnStart()
{
AddUseItemCallback("", "TowerKey", "TowerDoor", "UsedKeyOnDoor", true);
SetEntityPlayerInteractCallback("TowerDoor", "TeleportFunction", true);
}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("TowerDoor", false, true);
    PlaySoundAtEntity("", "unlock_door", "TowerDoor", 0, false);
    RemoveItem("TowerKey");
}

void TeleportFunction(string &in asEntity)
{
if (GetSwingDoorLocked("TowerDoor") == false)
{
ChangeMap("Custom02", "PlayerStartArea_1", "", "");
}
}
This might work? But it's not a swing door. :/

Whoops... Alright, fixed that.

(This post was last modified: 05-07-2011, 12:48 AM by Kyle.)
05-07-2011, 12:43 AM
Find


Messages In This Thread
Level door - by Karai16 - 05-06-2011, 11:46 PM
RE: Level door - by dragonlordsd - 05-06-2011, 11:49 PM
RE: Level door - by Karai16 - 05-06-2011, 11:51 PM
RE: Level door - by Kyle - 05-06-2011, 11:57 PM
RE: Level door - by Karai16 - 05-07-2011, 12:27 AM
RE: Level door - by dragonlordsd - 05-07-2011, 12:41 AM
RE: Level door - by Kyle - 05-07-2011, 12:43 AM
RE: Level door - by Roenlond - 05-07-2011, 01:54 AM
RE: Level door - by Karai16 - 05-07-2011, 09:37 AM
RE: Level door - by Russ Money - 05-07-2011, 10:19 AM
RE: Level door - by Victor - 10-23-2011, 06:56 PM



Users browsing this thread: 1 Guest(s)