How can I use a variable that is defined in a turtle context in a patch context?
netlogo
Solution
Try with myself : `[a] of myself`
Problem
How can I use a variable that is defined in a turtle context in a patch context ? This is my code (I simplified it) : ``` turtles-own [a] patches-own [b] to add-turtles create-turtles 2 [ set shape "turtle" set color gray set size 2 ] ask turtles [ setxy random-xcor random-ycor set a random 10 ] end to function let beta0 0.4 let beta1 0.9 ask turtles [ ask patches in-radius 8 [ set pcolor red set b beta0 + beta1 + a ] ] end ``` In this code, each of two turtles has a value of "a". I would like that patches in a radius of 8 around the first turtle obtain the value of "a" specific at this turtle + beta0 + beta1. It's the same thing for the second turtle. I have a error message : you can't use A in a patch context, because A is turtle-only