Waseem Adil
Waseem Adil

Reputation: 35

Using Time in Netlogo

I want to change the shape of turtle after specific time. I am weak at code so here is the mechanism in steps: 1). Turtle 1 attacks Turtle2. 2). turtle2 changes shape after attack to from "Shape1" to "Shape2". 3). turtle2 gain its shape back to "Shape1" after specific time. 4). I would like to use a slider for time duration selection.

Upvotes: 1

Views: 147

Answers (1)

mattsap
mattsap

Reputation: 3806

I'll assume you're talking about ticks.

Essentially, if the ticks is equal to a value, set the shape of the agents you want to something else..If you want to use a slider, replace some-time with the name of the variable...

if ticks = some-time [ ask turtle 0 [set shape "dot"]]

Upvotes: 1

Related Questions