Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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'm creating a game that has a "Life" Global Variable that I want persistent throughout all of the layouts.
First of all, I want to display the value of "Life" in a text box, but I'm having trouble doing so. So far I have
"Lives: " &[/code:m4haskfd]
How would I add the value of "Life" to that?
And also, I want an event for when "Life" goes below 1, but I don't know how to do that either. Can anyone help with this?
Develop games in your browser. Powerful, performant & highly capable.
Have you tried the Ghost Shooter tutorial? It covers some of this.
For lives you want:
"Lives: " & global('Life')
There's also a condition in the system object to compare a global variable.
Thank you! I knew it was going to be something really simple, but I just couldn't find it anywhere in the documentation or on here.