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've set up a collectible system with a counter so when I pick up a coin a text box displays: Player.coins / 21.
However, I don't have the same amount of coins per layout. Is there a way to make construct check how many coin instances are in the layout and display something like: Player.coins / number of coins in layout.
Hiya, number of coins in layout is coins.count
Develop games in your browser. Powerful, performant & highly capable.
But I am having a little trouble.
Is the expression like this: Player.Crates & " / " Coins.Count
Or: Player.Crates & " / Coins.Count"
It does not work either way
It's the first one with an & before Coins.count. It is an expression, don't put it inside ""
Coins is the object, whatever you called it.
Thanks I got it working but, as I pick up the coins the counter goes down.
So it starts at: 0/21
I pick up all my coins
And it ends at: 21/0
Is there a way to have it end at: 21/21
At the start of layout, set a global variable to be Coins.count, then set the text to show the global variable.
Ok I got it working.
I am having issues with the global setting though. I set my text object to global and on the first layout works like a charm. On the second however, it appears but is not set to the UI layer which has 0,0 parallax.
How would I make it spawn on layout 2's UI layer?
Keep the layers the same across the layouts and it'll be fine. If it's on layer 4 (by order, not name) on layout 1 it will remain on layer 4 in the list on layout 2.
It's working now