If I have for example:
for each Human -> Human.setFriendID(random(10))
it works the way I expect, assigning a value to the FriendID of each instance of type Human, presumably because the subject type of the action and the subject type of the loop are the same (Human).
However if I have:
for each Human -> Base.addTargetPosition(Human.x, Human.y)
where Base is an object of which there is only one instance, it only adds one Human to the list.
So in general, how can I loop over all instances of a particular type, but use some property of that instance to affect a single object of another type?
(only my second day using C2, so sorry if this is obvious)
Thanks!