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.

Newcomers DBPro Corner / Doing an action when certain time passes

Author
Message
Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 27th May 2003 22:02 Edited at: 27th May 2003 22:02
Im trying to play an idle animation on this model when 5 seconds have passed of doing nothing. I set up a variable "idle" to know when the character is idle. Ive run into a problem however it doesnt seem to work. My code is attatched. For anyone asking the idle variable is not in the DO..LOOP . So its not reassigning itself the same value. I think its the timer() command, but in fact I don't have a clue :p
Thanks.

Flawless Designs
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 27th May 2003 23:13 Edited at: 27th May 2003 23:16
stop object 1
set object frame 1,2
if idle=0 then idle=timer()+5000
endif

if idle>0 and timer()>idle
...
Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 28th May 2003 14:24 Edited at: 28th May 2003 14:26
Hm this gets my idle animation playing, but only the idle animation
My other animation code wont play at all. Ill post the animation code I have. Thanks for your input so far. Is there a way to play the moving animation without the "else" too? It interrupts other if statements but I couldnt think of any other way to do it. Thanks

*edit* ah I forgot to add idle=0 in the code box in between "set object frame 1,0" and "if idle=0 then idle=timer()+5000"

Flawless Designs

Login to post a reply

Server time is: 2024-11-24 16:50:27
Your offset time is: 2024-11-24 16:50:27