Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → multiple timers
multiple timers
2002-09-24, 5:35 AM #1
problem i had a while ago with making multiple timers in cogs... it seemed to me you couldn't have any more than the "message timer" one... i dunno if i need to pass values between cogs to get this to work...
2002-09-24, 7:20 AM #2
Code:
Message:
SettimerEX(Time, TimerID, param0, param1);
Stop;

Timer:
If(GetsenderID() == TimerID) Do stuff();

Else DoOtherStuff();

Stop;

End


------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-09-24, 7:22 AM #3
There are two verbs for setting a cog's timer: SetTimer() and SetTimerEx(). SetTimer() works with only one timer which it can start, reset, and stop.

SetTimerEx() works with any number of IDed timers which can be set with a delay of 0. KillTimerEx() is used to stop an IDed timer.

[edit] You beat me to it, GBK. [http://forums.massassi.net/html/frown.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited September 24, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-24, 8:36 AM #4
ooooooooooooooooooooohhhhhh

i was never quite sure what settimerex did

i'm bringing my problems here in future, rather than buggerising around for ages

thanks
2002-09-24, 10:38 AM #5
You're welcome. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-24, 11:34 AM #6
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SaberMaster:
You beat me to it, GBK. [http://forums.massassi.net/html/frown.gif]

</font>



Hehe. [http://forums.massassi.net/html/smile.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!