Removing a Timer - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Removing a Timer (/thread-8412.html) |
Removing a Timer - Greven - 06-02-2011 Hi there, Ive been trying and trying but I cant get this to work. I created a timer on OnEnter called GiantStep. And then in the GiantStep Func i added a timer that goes to GiantStep Func again (in other words a loop) Now I want this timer to be removed when the person picks up an item but the RemoveTimer doesnt work. So here's my .hps Code: void OnEnter() RE: Removing a Timer - Khyrpa - 06-02-2011 you must use the string& asName to check what timer to end... So change it like this: AddTimer("thishere", 4, "GiantStep"); RemoveTimer("thishere"); RE: Removing a Timer - Hardarm - 06-02-2011 (06-02-2011, 07:41 PM)Greven Wrote: Hi there, I think because your timer doesn't have a proper name ^^ Quote:AddTimer("", 0.1, "StopGiantStep"); Try to set, between those empty quote brackets, "GiantStep", and then try again Try and tell me if it works =) RE: Removing a Timer - Greven - 06-02-2011 Yeah it works just fine Thank you guys ^^ RE: Removing a Timer - Kyle - 06-02-2011 Hmm... That's a quick way to do it. I was thinking along the lines of using local variable integers. :/ |