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
Timer problems
Rahmerh Offline
Member

Posts: 66
Threads: 7
Joined: Jun 2015
Reputation: 3
#11
RE: Timer problems

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
06-30-2015, 07:23 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#12
RE: Timer problems

Cant find anyhting when looking into you script...
The Timer1 cant be found??
06-30-2015, 07:24 PM
Find
Rahmerh Offline
Member

Posts: 66
Threads: 7
Joined: Jun 2015
Reputation: 3
#13
RE: Timer problems

(06-30-2015, 07:24 PM)DnALANGE Wrote: Cant find anyhting when looking into you script...
The Timer1 cant be found??

Like I said, I changed/removed quite a bit to explain it better. The timers are foodhurt and foodhurt1
06-30-2015, 07:25 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#14
RE: Timer problems

foodhurt2
foodhurt3
foodhurt4

Try removing those
---
I see the problem...
///Time between hunger periods
PHP Code: (Select All)
void startGlobalHungerTimer(){
     
AddTimer("starvation"600"foodhurt");
 } 
--
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!
}
(This post was last modified: 06-30-2015, 07:32 PM by DnALANGE.)
06-30-2015, 07:28 PM
Find
Rahmerh Offline
Member

Posts: 66
Threads: 7
Joined: Jun 2015
Reputation: 3
#15
RE: Timer problems

(06-30-2015, 07:28 PM)DnALANGE Wrote: foodhurt2
foodhurt3
foodhurt4

Try removing those
---
You only remove the 2 other Foodhurts:
PHP Code: (Select All)
RemoveTimer("foodhurt2");
     
RemoveTimer("foodhurt4"); 
Try adding the foodhurt3 as well...
It keeps calling otherwise

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?
(This post was last modified: 06-30-2015, 07:35 PM by Rahmerh.)
06-30-2015, 07:31 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#16
RE: Timer problems

It will restart the whole sequence again, and will call again and again after it will be removed.

Then set variable?
AddGlobalVarInt might do?
(This post was last modified: 06-30-2015, 07:37 PM by DnALANGE.)
06-30-2015, 07:36 PM
Find
Rahmerh Offline
Member

Posts: 66
Threads: 7
Joined: Jun 2015
Reputation: 3
#17
RE: Timer problems

We ended up fixing it via skype, thanks!
06-30-2015, 08:19 PM
Find




Users browsing this thread: 3 Guest(s)