Points going above sprites heads.

Get help using Construct 2

Post » Wed May 22, 2013 1:21 am

I am wondering if there is a way to have points fly above sprites heads as I earn them, like in super mario world for the snes. I already have my game set up to add up my score in the HUD when I stomp critters but it would just be cool to see the numbers pop up like +1!

If anyone knows how this could be set up I would love to know about it! Thanks much!
B
8
Posts: 42
Reputation: 1,009

Post » Wed May 22, 2013 1:51 am

You can make a text object and, each time you want to display points, create the text object at sprite.X and sprite.Y-(value) to put the points above your sprite. Set the value (100, 200, 300...) Then destroy the text object :)

If you want the text object move to make it more dynamic you can set the sine behavior on it.

This works with sprite instead of text object too.Lowren2013-05-22 01:53:25
B
20
S
5
G
3
Posts: 58
Reputation: 4,136

Post » Wed May 22, 2013 2:29 am

Lowren beat me to it, here is the example I just made:
https://dl.dropboxusercontent.com/u/85412219/forumposts/FloatingScore.capx

It uses behaviors to make it float away, fade out, and destroy itself.
so you just spawn it and forget it. 1 event.
B
201
S
52
G
30
Posts: 897
Reputation: 36,621

Post » Wed May 22, 2013 2:38 am

I made an example on the Arcade:



It's a function with only one event, and you can call it using any score value. You will need a custom font for it (I made one for the example) or you can change it a bit to just use text.
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Wed May 22, 2013 5:02 am

Thanks for all the help guys. Those examples especially helped a lot!
B
8
Posts: 42
Reputation: 1,009


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests