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...