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
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
In my game, I'm making Psi's health a global variable. From the start, I want her to have some basic health and energy regeneration. How do you set the upper limits of this so a +1 health won't go higher than the variable?
You can use the clamp instruction.
clamp(x,low,high) will be :
low if x < low
x if low < x < high
high if high < x
You can find it in the system expressions.
Thank you Guizmus!
I'm trying that right now but having a hard time gtting it in right. Could you be specific of how to set the global variable with it?
Develop games in your browser. Powerful, performant & highly capable.
Here is an example. There is an heath regeneration of 1/sec, and you have buttons to add an substract heath. Events should help you see how to use this instructions.
Thank you for the example Guizmus!