Quick and easy question - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Quick and easy question (/thread-19360.html) |
Quick and easy question - Steve - 11-26-2012 Is there a way to remove an callback like when I click on a door it sdays something and when I broke it open the door ofcourse doesn't say anything anymore. So I want to like remove the callback of the message when I broke it so is this possible? RE: Quick and easy question - The chaser - 11-26-2012 Yea, there are some like: RemoveEntityCollideCallback(string& asParentName, string& asChildName); RemoveCombineCallback(string& asName); RemoveUseItemCallback(string& asName); All of these are void. Hope that helped RE: Quick and easy question - FlawlessHappiness - 11-26-2012 Or you could make a LocalVarInt, so if(GetLocalVarInt("VarName") == 0) { DO STUFF } And then later when the callback shouldn't be there anymore call SetLocalVarInt("VarName", 1) RE: Quick and easy question - Steve - 11-26-2012 (11-26-2012, 05:48 PM)beecake Wrote: Or you could make a LocalVarInt, so I see what you are running at I think I can make some of this RE: Quick and easy question - GoranGaming - 11-26-2012 (11-26-2012, 04:58 PM)Steve Wrote: Is there a way to remove an callback like when I click on a door it sdays something and when I broke it open the door ofcourse doesn't say anything anymore.You could also do: void OnStart() { SetEntityPlayerInteractCallback("DoorName", "InteractDoor", false); } void InteractDoor(string &in asEntity) { if(GetSwingDoorLocked("DoorName")== true) { SetMessage("Category", "Entry");//Sets a message when the door is locked } else { //When the door is open and you press it, nothing happens } } |