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!
use PIN behavior and pin the text to the sprite after it is created. after that fill the text you want
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.
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.
Develop games in your browser. Powerful, performant & highly capable.
Thanks guys! You are awesome!
Pinning alone dont work? (As you can see in attachment.)
Don't pin it every tick, just once. For example move the Pin to action after the Create object Text action.