Reputation: 11
I'm trying to have turtles go around and eat each other. I have a variable that tracks each of their energy. I want it so that when a turtle eats another turtle the energy gained by the first turtle is based off of the energy of the second turtle. Is this possible? If so, how do you do that?
Upvotes: 0
Views: 197
Reputation: 17678
It would be helpful if you included the code you already have. But you will need a statement something like:
ask this-turtle [ set energy energy + [energy] of that-turtle ]
Upvotes: 1