OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: eegore on 28 Nov 2009, 11:04:37
-
How do I get a trigger to send a group to a location if their distance is under 10m from another object? I did have the command grouped to the leader but if he dies the nobody moves after that.
My current attempts all give errors:
(grp1 distance h1) < 10 domove getpos GL1
(_grp1 distance h1) < 10 domove getpos GL1
(units grp1 distance h1) < 10 domove getpos GL1
(units _grp1 distance h1) <10 domove getpos GL1
(grp1 get_your_ass_in_the_helicopter_now_because_I_am_10m_away) still nothing.
All I am trying to do is have multiple groups I have to fly in and pick up, then I drop them off at an LZ and they run off. So far I can get individual units to board but I dont want to make a bunch of seperate triggers because I'll end up with well over 100 triggers to get all units back to the staging area.
Thanks
-
Condition:
(leader grp1) distance h1 < 10
-
Man that was simple. I looked all over and didnt see the leader commands.
Along the same lines I used to use a disembark script in OFP to get cargo out of my helicopter so I didnt have to use a trigger for each group to exit as well as enter. That script does not work in ArmA.
CargoList = (Crew Chopper) - [Driver Chopper] - [Gunner Chopper]
"unassignVehicle _x" foreach CargoList
"_x DoMove getPos RallyPoint" forEach CargoList
exit
I get errors for both unassign and domove regarding the groups that are in my cargo. What changes need to be made here so the current groups dont need seperate triggers for loading and unloading?
Thanks again.
-
CargoList = (Crew Chopper) - [Driver Chopper] - [Gunner Chopper];
{unassignVehicle _x} foreach CargoList;
{_x DoMove getPos RallyPoint} forEach CargoList;
Some things have changed since OFP. Code has to be in curled braces. And you better should use SQF syntax.
-
Thanks for the help here.
I'll test it out when I get to the office.
I got back into OFP about a year ago and most my ArmA knowledge has gone out the window. I should prob snag ArmA 2 just to stay in the loop and stop living in the past.
Anyway thanks for the adjustments to my script.
-
NNOOOOOOOO! Live in the past. Its okay. There is nothing wrong with playing or editing inside OFP. It's STILL a great game. Just outdone in performance and graphics. There are plenty of us pastrunners still lingering in the game.