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've programmed a health instance variable to allow my player character to take multiple hits from enemies before keeling over, alongside items to refill his health. The problem I'm having is making sure he cannot reach higher than say, 3 Health.
You can use the min() expression.
Ex: Health = min(Health, 3)
It hasn't changed anything. Am I missing something?
Develop games in your browser. Powerful, performant & highly capable.
Post your events for increasing the value.
System -> compare two values -> health ≥ 3
Set Health to 3
Here's the events that change the player's health for reference.
Bacon's method worked, but thanks for the help guys.
-> System: Set Health to min(3, Health + 1)
Do the same for NicoBox.