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 / updating variables

Author
Message
RadiusOFT
19
Years of Service
User Offline
Joined: 14th Jul 2005
Location: Aloha, OR(egon)
Posted: 5th Sep 2006 03:30
How do i update a variable in a loop without the variable updating every frame? i want to subtract one from "MyHead" how would i make it so it only did it once and not a billion times?

Do or do not... there is no try -yoda
cats fit best in a george forman - not yoda
Trinita
21
Years of Service
User Offline
Joined: 29th Sep 2003
Location: Italy
Posted: 5th Sep 2006 10:43
Use a Flag variable.
For example


Ciao

"An eye for an eye will only make the whole world blind."
Cave Man
18
Years of Service
User Offline
Joined: 22nd Aug 2006
Location: North Carolina, US
Posted: 5th Sep 2006 15:19
or just use another variable as a "timer". just set it to a value, decrease it 1 every loop, when it gets to zero, decrease MyHead, then set the timer back to the default value.

example




Language: DBP 6.2
cm 2 my hse aftr skool so we cn ply aoe3

Login to post a reply

Server time is: 2024-11-26 11:27:16
Your offset time is: 2024-11-26 11:27:16