I have two turtles - seller and buyer in one patch, and they have shape "face happy"
.
But on interface when I run setup if there are two turtles in one patch i can see only one of them.
my question is, how can i code it so that to see both of them. if its not possible at least to see in some patches one agent in others another one.
and here is my code:
ask sellers
[move-to one-of patches with [not any? turtles-here]]
ask buyers
[move-to one-of patches with [not any? buyers-here]]
ask buyers [if any? sellers-here [set shape "face happy"]]
ask buyers [if not any? sellers-here [set shape "face sad"]]
ask buyers [if any? sellers-here [set color 67]]
ask sellers [if any? buyers-here [set shape "face happy"]]
ask sellers [if not any? buyers-here [set shape "face sad"]]
ask sellers [if any? buyers-here [set color 137]]
First of all, note that you can actually tell if both are present from your face and color cues. If you want to see both, you will need to set transparent colors, or offset the locations, or both. E.g.,
ask buyers [
move-to one-of patches with [not any? buyers-here]
ifelse (any? sellers-here) [
set shape "face happy"
set color [255 0 0 125]
fd 0.45
][
set shape "face sad"
]
]
Assuming patches with two turtles at the center of patch:
to spread-out
ask patches with [count turtles-here = 2]
[ask one-of turtles-here [
fd .25
ask one-of other turtles-here [face myself fd -0.25]]]
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