0

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
Blorgbeard
  • 101,031
  • 48
  • 228
  • 272
Cchan
  • 13
  • 1

1 Answers1

2

Do you mean like this decrement-counter with the condition, "if excitation > 0"?

globals [ excitation ]

if excitation > 0 [
set excitation excitation - 1
]
goodgest
  • 418
  • 3
  • 10
  • You can refer this answer also. https://stackoverflow.com/questions/4296818/how-can-one-create-a-countdown-timer-in-netlogo – goodgest Oct 13 '17 at 16:05