![]() |
Timer problems - 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: Timer problems (/thread-30184.html) Pages:
1
2
|
RE: Timer problems - Rahmerh - 06-30-2015 Yeah reason for that is because there are multiple items that have to call that command. So I thought it would be easier to put it into a function RE: Timer problems - DnALANGE - 06-30-2015 Cant find anyhting when looking into you script... The Timer1 cant be found?? RE: Timer problems - Rahmerh - 06-30-2015 (06-30-2015, 07:24 PM)DnALANGE Wrote: Cant find anyhting when looking into you script... Like I said, I changed/removed quite a bit to explain it better. The timers are foodhurt and foodhurt1 RE: Timer problems - DnALANGE - 06-30-2015 foodhurt2 foodhurt3 foodhurt4 Try removing those --- I see the problem... ///Time between hunger periods PHP Code: void startGlobalHungerTimer(){ void eating1(string &in asTimer){ FadePlayerRollTo(0, 33, 33); FadeIn(2); GiveSanityBoostSmall(); AddPlayerHealth(20); SetPlayerMoveSpeedMul(1); FadeImageTrailTo(0, 0.5f); PlayGuiSound("eating-apple.snt", 10); SetEntityActive("ScriptArea_7", false); SetMessage("Messages", "IAte", 2); startGlobalHungerTimer();// <--- Keeps recalling every time! } RE: Timer problems - Rahmerh - 06-30-2015 (06-30-2015, 07:28 PM)DnALANGE Wrote: foodhurt2 I remove those timers because they call eachother's functions. Tried removing all 4 of em, still the same.. EDIT: Really? Shouldn't that call it just once? RE: Timer problems - DnALANGE - 06-30-2015 It will restart the whole sequence again, and will call again and again after it will be removed. Then set variable? AddGlobalVarInt might do? RE: Timer problems - Rahmerh - 06-30-2015 We ended up fixing it via skype, thanks! |