min/max variable value

Get help using Construct 2

Post » Sat Oct 31, 2015 6:19 pm

Is there a way to set a minimal and maximal variable value?
*misses old games*
B
20
S
4
G
4
Posts: 147
Reputation: 3,193

Post » Sat Oct 31, 2015 6:21 pm

You could use the clamp() expression.

every tick
> set variable to clamp(variable, 0, 10)
B
95
S
34
G
128
Posts: 5,494
Reputation: 81,676


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests