I would like to compare a turtle variable with the patch variable on which it is standing.
ask patches with [ pcolor = green and inventory > 0]
[ ask one-of turtles-here
[if myself [ conviction] > detection )
Conviction is a turtle variable and detection is a patch variable. Can it be done. This is my first posting. So apologies if the format is not correct.
A turtles has direct access to the variables of the patch under it:
turtles-own [ conviction ]
patches-own [ detection ]
to go
ask patches [
ask one-of turtles-here [
if conviction > detection [ ; the turtle accesses both variables directly
; do something
]
]
]
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With