OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Gogs on 17 Nov 2005, 19:03:02

Title: Returning the units within a trigger....
Post by: Gogs on 17 Nov 2005, 19:03:02
I'm working on a script. I have the meat and bones of it out the way, but this is my sticking point. I want to check for any East units within a certain radius of the player, and run the script for these units specifically. I don't want to be running the script seperately for each East unit, simply for lag reasons. I'm not explaining this very well. What I want is...

Looking at what I just wrote, its clearly more of a triggering issue than a scripting one. Anybody got any ideas?
Title: Re:Returning the units within a trigger....
Post by: Trapper on 17 Nov 2005, 20:51:01
On activation: {_x exec "yourscript.sqs"} foreach thislist

Every unit(s) that activates the trigger should then run the script.
Title: Re:Returning the units within a trigger....
Post by: macguba on 17 Nov 2005, 22:09:19
A looping script/gamelogic moves Trapper's trigger to the player's position, and controls a variable which makes the trigger fire each time.

Obviously the size of the trigger is the distance you want.  Trigger should be "East present" (or whatever) with the variable in the Condition field.
Title: Re:Returning the units within a trigger....
Post by: Gogs on 18 Nov 2005, 12:32:36
Thats brilliant guys. Thanks. I'll go and have a play and get it working. Cheers!  :D