BehaviourComposer: ignore everything before this.I set my state to 'infected' and update my colour to display my status.
Change my state to infected
Begin NetLogo code:
substitute-text-area-for infected-index-color yellow substitute-text-area-for infected-color red set my-next-state "infected" ifElse time < .001 [set color infected-index-color] [set color infected-color]
End NetLogo code
You can change the colour used to display infected individuals.
This sets the attribute my-state to be infected at the end of this time cycle. (The "next" part of the name delays this so everyone updates at the same time.) It then sets the colour depending upon whether this is during initialisation or after.
This was implemented by Ken Kahn on 3 February 2011.
BehaviourComposer: ignore everything after this.