Breed won't appear on interface - Netlogo
working on a project for varsity here and we're working in Netlogo. Basically i have a function that spawns medkits every 15 ticks, yet they don't appear on the screen. The code is basically as follows:
breed[kits kit] kits-own [qtEner] to Go spawn-kits end to spawn-kits if (remainder ticks intervalo) = 0 [ create-kits 1 [ set nrg qtEner set shape "medkit" set size 1.5 set heading 0 setxy random-xcor random-ycor output-type "Created" ] ] end
Would appreciate some feedback. Thanks a million.
What is your setup procedure? Do you have a
ticksomewhere to increment your counter?
Also, I think you may want
set qtEner nrgif you want the kits to have their
kits-ownvariable independently set.
This works for me:
breed[kits kit] kits-own [qtEner] to setup ca reset-ticks end to Go spawn-kits tick end to spawn-kits if (remainder ticks 10) = 0 [ create-kits 1 [ set qtEner 5 set shape "circle" set size 1.5 set heading 0 setxy random-xcor random-ycor print "Created" ] ] end