Hi, need some help, can't figure out whether it's an OpF or MaBrain-problem...
What i try to do :
Placed an empty flagcarrier object (a flag) and a trigger over it, set to 'Repeating' and 'Anybody'. Therefore it calls a script everytime a person/vehicle from either side enters it, giving 'ThisList' to the script.
My script should get the whole array 'ThisList' from the trigger - it includes all objects that are within the triggerarea, right ?
Now depending on all objects in the array i want to determine what side they're on / which flagtexture i should set on the flagcarrier.
(I can refer to the flagobject via "flagcarrier" nearestObject (pos of 1st object in array)).
I want to do this because it would only require 1 trigger for 1 flag, rather than several. Also, i don't need to name the flag or the trigger because i want to use nearestObject.
Can it be done at all ?
Anyway, my outcomes are:
It works when i as the player go into the trigger: even if there are some AI buddies with me there's only 1 thing in ThisList. But i can change the flagtexture because nearestObject() gives me the flagobject.
It doesn't work when i send 1 or more computer mates into the trigger. There's still only 1 thing in ThisList, but nearestObject won't find a flagcarrier object ! As if it isn't there.
Does this mean, objects in ThisList are only valid when i go into the trigger myself ? I don't get it ...
Anyone could cast some light on this ?