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
Checkpoints Help
Kiorga(x2)rd Offline
Junior Member

Posts: 43
Threads: 12
Joined: Sep 2011
Reputation: 1
#1
Checkpoints Help

Hi

So the player walks into a room and at the other end is a key. When the key is interacted with I add a new collide callback to a script area that is in the entrance to the room. When the player walks back out the room with the key, a new collide callback is activated in five seconds for a script area that takes up the entire room that kills the player. So the player has to move out of the room quickly.

If you successfully get out of the room in time, but die in the next room, I want the player to respawn right before you pick up the key. However whenever I do that, I die instantly because the collide callback for the script area that fills up the whole room hasn't been collided with yet, so it still exists and kills you as soon as you respawn.

Is there a way to, in the same way you can AddEntityCollideCallback, remove an entity collide callback? So that on respawn I could remove the collide callback for the script that kills you, then when the player picks up the key again, the script area at the doorway activates again, and when you collide with it the collide callback for the script that takes up the whole room and kills you in five seconds activates again.

This was very hard to explain, and I'm not sure if it is clear.

Thank you!

Apparently the user name "Kiorgaard" isn't accepted by the administrator. Turns out you can't have a name with a double 'a' in it. Odd...
07-17-2012, 06:00 AM
Find
Zaari Offline
Member

Posts: 118
Threads: 0
Joined: Mar 2012
Reputation: 10
#2
RE: Checkpoints Help

RemoveEntityCollideCallback(string& asParentName, string& asChildName);

"Marzipan, darling."
07-17-2012, 08:58 AM
Find
Kiorga(x2)rd Offline
Junior Member

Posts: 43
Threads: 12
Joined: Sep 2011
Reputation: 1
#3
RE: Checkpoints Help

My god is there such thing. I apologise, I have no idea why I didn't see that.

Thank you.

Apparently the user name "Kiorgaard" isn't accepted by the administrator. Turns out you can't have a name with a double 'a' in it. Odd...
07-17-2012, 09:00 AM
Find
Zaari Offline
Member

Posts: 118
Threads: 0
Joined: Mar 2012
Reputation: 10
#4
RE: Checkpoints Help

(07-17-2012, 09:00 AM)Kiorga(x2)rd Wrote: My god is there such thing. I apologise, I have no idea why I didn't see that.

Thank you.
It's fine, that happens to me all of the time. Heh.

"Marzipan, darling."
07-17-2012, 09:01 AM
Find




Users browsing this thread: 1 Guest(s)