Timer how to make ? Author Message
FireMan
Member

 Post: #1 Timer how to make ? How to do that at 1 minute some variable reduced its value by 1 for example: Int hp = 100; and at 1 minute reduced its value by 1 So 99, 98 (how to make timer) Forum reklamowe: http://ad-forum.pl
11-27-2009 11:52 AM
Harry
Member

 Post: #2 RE: Timer how to make ? In Bloody Massacre you've got sht like this health+=Tm.d()/2; MIN(health,100); Maybe it helps you.
11-27-2009 12:58 PM
FireMan
Member

 Post: #3 RE: Timer how to make ? Yes, but the hp points has add to fast. I make: hp+=Tm.d()/2+1; MIN(hp,100); Forum reklamowe: http://ad-forum.pl
11-27-2009 01:14 PM
Harry
Member

 Post: #4 RE: Timer how to make ? maybe try Tm.d()/3 or higher values.
11-27-2009 01:35 PM
FireMan
Member

 Post: #5 RE: Timer how to make ? I tryed Forum reklamowe: http://ad-forum.pl
11-27-2009 01:56 PM
Kevin
Member

 Post: #6 RE: Timer how to make ? Or you can do it like this: Code: ```if(Tm.curTimeMs() - lastHealthReg >= regRateInSec * 1000) {     //Increase health...     lastHealthReg = Tm.curTimeMs(); }``` (lastHealthReg is a UInt, stored as member variable) (This post was last modified: 11-27-2009 06:47 PM by Kevin.)
11-27-2009 06:46 PM
FireMan
Member

 Post: #7 RE: Timer how to make ? THX, I make that: Code: ```hp2 = Tm.curTimeMs()/10000; hp= 100-hp2;``` Forum reklamowe: http://ad-forum.pl
11-27-2009 07:33 PM
 « Next Oldest | Next Newest »