Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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!
Develop games in your browser. Powerful, performant & highly capable.
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.
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.