How do I Make Damage Numbers Change Size?

Get help using Construct 2

Post » Sun Mar 30, 2014 6:42 pm

I'm creating a top-down action/RPG where damage numbers appear over enemies when you attack them (or when they attack you!). I have that working fine, but I would like to make the display more dynamic by having the numbers start off "zoomed" when they first appear, then quickly shrink and vanish.

What is the most efficient way to add this "zoom" effect to my sprite font displays?
B
11
S
3
Posts: 30
Reputation: 745

Post » Sun Mar 30, 2014 6:55 pm

Does it have to be sprite fonts - have you looked at using particles ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Mar 30, 2014 6:59 pm

Yes, I'd ideally like it to be with Sprite Fonts, to keep my style consistent.

The look I'm going for is like in Diablo 3. There must be a way to use the "scale" on the Sprite Font to make it animate a grow/shrink, right?
B
11
S
3
Posts: 30
Reputation: 745

Post » Sun Mar 30, 2014 7:23 pm

in that case there is a "spritefont set scale"

so something along the lines of

set an instance variable holding scale

then every x seconds
set spritefont scale to instance variable
instance variable=instance variable - 0.1
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Mar 30, 2014 7:35 pm

quick test
You do not have the required permissions to view the files attached to this post.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Mar 30, 2014 9:04 pm

Nice! That makes a lot of sense. Thanks for putting that example together. Good idea making the "iv"Scale instance variable to hold the value!
B
11
S
3
Posts: 30
Reputation: 745

Post » Mon Mar 31, 2014 7:27 am

rythom wrote:Nice! That makes a lot of sense. Thanks for putting that example together. Good idea making the "iv"Scale instance variable to hold the value!


Glad you liked it.

( I'm full of good ideas :) - it's just that most of them don't work :cry: )
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Mon Mar 31, 2014 8:21 am

RamPackWobble wrote:
rythom wrote:Nice! That makes a lot of sense. Thanks for putting that example together. Good idea making the "iv"Scale instance variable to hold the value!


Glad you liked it.

( I'm full of good ideas :) - it's just that most of them don't work :cry: )


@RamPackWobble Nice solution with the ivScale!! I have add a little jump, because I was searching something like this ;)

I want to be full of ideas (good ideas not possible for me hahaha) !!! ;)
You do not have the required permissions to view the files attached to this post.
B
17
S
5
G
2
Posts: 173
Reputation: 2,085

Post » Mon Mar 31, 2014 12:32 pm

Taking inspiration from @Tarkion (OK I stole the idea about moving the spritefont upwards ) I now get...
You do not have the required permissions to view the files attached to this post.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Mon Mar 31, 2014 12:56 pm

Hey works nice @RamPackWobble :)

I was happy with my last modify setting the "...2*cos..." to "...10*cos..." and so the move upwards looked nice, but I like more your movement improved now haha!!!! :)
B
17
S
5
G
2
Posts: 173
Reputation: 2,085


Return to How do I....?

Who is online

Users browsing this forum: Bootfit, brunopalermo, tarek2 and 7 guests