I would like to know how to write a piece of code that causes "excitation" to decrease by 1 each tick without dropping below zero in Netlogo.
So far I have come up with this:
set excitation - 1
I would like to know how to write a piece of code that causes "excitation" to decrease by 1 each tick without dropping below zero in Netlogo.
So far I have come up with this:
set excitation - 1
Do you mean like this decrement-counter with the condition, "if excitation > 0"?
globals [ excitation ]
if excitation > 0 [
set excitation excitation - 1
]