How do I create objects with an individual text above

Get help using Construct 2

Post » Sat Sep 13, 2014 12:45 pm

Hey guys,

I would like to create objects (sprites) "every random(4,8) seconds" on the layout.

Above each of these created objects should appear a text field with an individual text so that each sprite got a "special" different value above.

How can I realize this combination of sprite and text field showing a indivual value?

Thanks in advance!
B
5
Posts: 8
Reputation: 237

Post » Sun Sep 14, 2014 12:21 am

use PIN behavior and pin the text to the sprite after it is created. after that fill the text you want
B
19
S
6
G
3
Posts: 197
Reputation: 4,154

Post » Sun Sep 14, 2014 6:17 am

For each sprite, spawn a text object, and set it's text value. Then for the text, set x to the sprite's x and then set y above it slightly to position it.
As yonda said, pin it if these sprites are moving and you want to keep them attached.
B
32
S
7
G
2
Posts: 317
Reputation: 2,851

Post » Sun Sep 14, 2014 1:35 pm

Easiest to use a Container so that you always get the text created for you when you create a sprite (and picked). Then move, pin, etc. if needed.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Sep 17, 2014 12:32 pm

Thanks guys! You are awesome!

Pinning alone dont work? (As you can see in attachment.)
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 8
Reputation: 237

Post » Wed Sep 17, 2014 12:58 pm

Don't pin it every tick, just once. For example move the Pin to action after the Create object Text action.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: beguinner, mcscooter, totoe, Yahoo [Bot] and 21 guests