>
> Yeah, I read that was the case. So, should I give each badguy a variable, put the detectors in each badguy's container, assign a variable to all the detectors and badguys, and pick each of them and give them the nearest UID?
>
> Or should I just duplicate code?
>
Do something like below.
On family "badguy" created
For each "badguy"
create/spawn detector
set variable "detector.parent" to "badguy.UID"
Then if the detector colides with whatever it is to collide with do:
On detector collides with whatever
for each detector
pick badguy by uid [detector.parent]
do events for badguy
Should work IIRC. Let me know if it does not, I will be using a similar method to link inventories to NPCs and Loot Containers in my current project.
Also family.uid=object.uid, you can also use that to check if a family member is a particular object type IIRC.
Gonna try this, should I still use containers at all, or just remove the two detectors from the container and spawn them? Also, is that definitely spawn and not create (two different processes)?
Also, how about turning each character left or right? Is that just a case of using foreach?