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
Guys i did search in google but cant find fix for my problem. example is. i have turret and gold if i have 500 gold i am pressing turet and its fire rate increase. but problem is if i have even 10 gold its goes to -490 and turret anyway upgraded. or even if i make it like if variable less or equal 0 set value 0 its doesnt help cose turret is upgraded anyway. how i can make it cap like minimum 0 maximum 1000, i did try to use clam but after it gold wont substracted. hope you will help me. maybe i am using wrong clamp. thank you.
Add a condition in the event to upgrade the turret, where current gold must be greater than the cost of the action for it to run.
Develop games in your browser. Powerful, performant & highly capable.
Make it in a way that you can only upgrade the turret if the current amount of gold is Greater or Equal to the cost of the repairing.
For the upper bound (gold limit), set the amount of gold to the limit everytime it's greater than the limit...