yugioh-like number increase/decrease

For questions about using Classic.

Post » Tue Jan 19, 2010 12:24 pm

How do you make a simple number increase/decrease effect like Yugioh's LifePoint thingy?
Like from a 4000 LP, it will show up random numbers in a decreasing fashion until it ends up with 0.
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Tue Jan 19, 2010 1:22 pm

You could count down to zero over time. In another event you could use a random value for milliseconds to take the current value and present it.

-Every 5 milliseconds
-Every random(1000) milliseconds
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Jan 19, 2010 2:20 pm

How do I count down to zero? Am I suppose to print a random number while the real values are actually decreasing and will only show the real value once it reaches it designated... value?
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Tue Jan 19, 2010 6:29 pm

Try to have 2 variables, one for the shown life point and another with the actual lifepoint.
Updates them when needed, then you can make the shown lifepoint decrease until it reach the actual lifepoint like every frame or every 5ms.
B
3
G
3
Posts: 6
Reputation: 887


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests