Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / More timers or array of timers

Author
Message
lux1963
7
Years of Service
User Offline
Joined: 6th Jan 2017
Location:
Posted: 24th May 2017 04:07
Some games need more timer. In AppGameKit I have only a timer but in other program is possible to have many timer (array of objet timer).
How create a array of timer and resettimer?


explample:
alpha = timer(1)
beta = timer(2)
.............
if hungry = 0 then resetimer(1)
.............
resetimer(2)
delta=timer(3)

max precision at second




Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th May 2017 06:53
example









AGK (Steam) V2017.05.15 : Windows 10 Pro 64 Bit : AMD (17.4.4) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th May 2017 11:59
Would it be better to call the time outside of the loop? So the array stays a little more synced if you get what i mean.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th May 2017 12:05 Edited at: 24th May 2017 12:08
you mean like this? because > test the reset to zero make it out of sync.
if ping[0].m => 1.0
ping[0].m=ping[0].m-1.0

AGK (Steam) V2017.05.15 : Windows 10 Pro 64 Bit : AMD (17.4.4) Radeon R7 265 : Mac mini OS Sierra (10.12.2)

Login to post a reply

Server time is: 2024-03-29 00:59:11
Your offset time is: 2024-03-29 00:59:11