Spawn moving text that follows unit with an offset

Get help using Construct 2

Post » Thu Jan 24, 2013 6:20 am

I want to spawn text showing damage done when a bullet hits a moving sprite above that moving sprite's head as it moves. I want this spawned text to stay attached to the damaged unit's head but also float vertically over time, just like most Blizzard games display fading/moving numbers above units heads fading away over time. I can not for the life of me get this to work. I can spawn the text above the sprites head after bullet impact no problem. I can not get a sub event where every tick it moves the damage text to the position of the damaged unit then uses a delta time to move the text up. Is there a bug with using every tick events as a sub event? I have also tried the every tick event as it's own separate event: Every Tick - Set the position of the text to the damaged unit with a delta offset, but this also does not work. Keep in mind that I will have multiple sprite instances all needing this damage text floating above the different instances at any given time. Bedhead72013-01-24 06:25:50
B
2
Posts: 2
Reputation: 579

Post » Thu Jan 24, 2013 6:55 am

Have you tried using the Pin behavior?
https://www.scirra.com/manual/99/pinArcadEd2013-01-24 06:55:21
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Thu Jan 24, 2013 7:09 am

I have tried pin and it does make the text move with the object, but I can't give it secondary vertical motion :(
B
2
Posts: 2
Reputation: 579

Post » Thu Jan 24, 2013 11:13 am

Something like this perhaps?

Scrolling text demo

Using some custom behaviors like MoveTo or EasyTween creating this would probably be a bit easier.vee412013-01-24 11:19:05
B
24
S
8
G
7
Posts: 756
Reputation: 7,192


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests