So I've got a family set up for objects with a certain AI. I only have one object in the family right now. All instances do the same thing at the exact same time, which is incorrect. I thought I could fix it by putting all of the events on the sheet under a "For each" event, but now all of instances only act when the first instance acts. I'm guessing there's a simple solution for this, and I'm just missing it. Can I get some advice?
Develop games in your browser. Powerful, performant & highly capable.
Actually it's the last instance in the for loop that sets the actions.
What you need to do is not globally activate the groups (because then it will be the same for every family member in the end, since the last of the loops just decides what's active and what not). Simple advise: use an instance variable for that family, maybe call it "mode" and assign to it "look" "chase" "attack".
Then in your chase events first pick family by comparison family.mode = "look", or whatever action you wanna do. This way only family members will be affected, that are in the correct mode.