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 have multiple instance of Sprite and Text
i want to pin each text over sprites.
I am trying with "for each" but something wrong i doing.
please help.
Develop games in your browser. Powerful, performant & highly capable.
You should set the position of text before pinning it.
text is already positioned over sprite as you can see in image above
Do you use Container?
I think right now the text won't know which one should pin yet, and it will choose random sprite.
No I am not using Container because i am using text for other purpose too where i use another sprites
give each text and each sprite an instance variable like which = 1 ( from 1 to 10 )
Then do for each sprite, add subevent if text.which = sprite.which text.setposition Sprite.X and Sprite.Y ( + whatever offset you need to cernter it, if any )
i want to pin them together but not by using positions.
Isn't the pin behavior basically the same thing, only in a form of a behavior?
Well, same logic should work even if you use pin behavior
Yes i know, but i was just willing to learn how to do with pin behavior.
I have got it working.