Frictional Games Forum (read-only)

Full Version: Help Needed!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have made a AddEntityCollideCallback with TRUE set at the end to remove callback. But when I go to other map and then return to this one and when I enter area AddEntityCollideCallback activates again. Callback is under OnEnter(), because you will enter this map several times, and you wont trigger Fuction on your first enter!

Q1: How do I set that it does not repeat after I come back from another map! And I don't wont it to be under OnStart(), because it cant be triggered then! Or is there remove callback function, because I didnt found one!



Q2: And if anyone have time to answer this: How to set, when doors are locked when interacted with message appears (This works), but after doors are unlocked when interacted, to message do not appear!



Sry for English!

(08-20-2012, 03:57 PM)shadowZgamerZ Wrote: [ -> ]I have made a AddEntityCollideCallback with TRUE set at the end to remove callback. But when I go to other map and then return to this one and when I enter area AddEntityCollideCallback activates again. Callback is under OnEnter(), because you will enter this map several times, and you wont trigger Fuction on your first enter!

Q1: How do I set that it does not repeat after I come back from another map! And I don't wont it to be under OnStart(), because it cant be triggered then! Or is there remove callback function, because I didnt found one!



Q2: And if anyone have time to answer this: How to set, when doors are locked when interacted with message appears (This works), but after doors are unlocked when interacted, to message do not appear!


Sry for English!

The OnEnter() is for functions that trigger each time you enter the map. Try using OnStart(). It should trigger once, and that is it.

In the case that doesn't work, use this.

RemoveEntityCollideCallback(string& asParentName, string& asChildName);
Yeah, I found function void RemoveEntityCollideCallback(string& asParentName, string& asChildName);.
I leaved everything the way it was, just added that function and with it solved both my problems!
Thanks for reply anyway!
(08-20-2012, 04:17 PM)shadowZgamerZ Wrote: [ -> ]Yeah, I found function void RemoveEntityCollideCallback(string& asParentName, string& asChildName);.
I leaved everything the way it was, just added that function and with it solved both my problems!
Thanks for reply anyway!
Just doing my best.