How to animate numbers for UI?

Get help using Construct 2

Post » Fri Oct 19, 2012 8:26 pm

Hey all, i was thinking how to make animated numbers using instance variables, imagine we have 1000 HP then a damage causes -10, the HP variable animates with susbtract like 999,998,997,996,995,994,993,992,991,990. It would be fast animation.

Maybe it reminds you Castlevania: Symphony of Night and Yu-gi-oh! games where HP gets damaged may animate numbers.


Thanks!

B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Fri Oct 19, 2012 8:51 pm

Yeah you could use a for loop.

Start with the current health, goto the amount of health left after taking x amount of damage.

update the health text box following the player, then wait .1 seconds.

you'll see it update 10 times or however much the damage taken was.

you might need to play around with the amount of "wait" time for each step of the loop.
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Fri Oct 19, 2012 9:03 pm

Well,I'm not that good in C2 but here's how i did it in my game

CAPX

Hope this will help you
B
12
S
3
G
4
Posts: 23
Reputation: 3,682

Post » Fri Oct 19, 2012 11:10 pm

@justifun, i tried it, well it actually didn't result. Would you mind to share a .capx?


@fathomeo that's awesome, it works like a charm, i would modify this .capx which there will be new damage counts like 18-24 for enemy instances.
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Sat Oct 20, 2012 7:35 am

happy to hear that it works for ya!
B
12
S
3
G
4
Posts: 23
Reputation: 3,682


Return to How do I....?

Who is online

Users browsing this forum: MarkThomas and 16 guests