Home   Help Search Login Register  

Author Topic: Group distance error  (Read 2132 times)

0 Members and 1 Guest are viewing this topic.

Offline eegore

  • Members
  • *
Group distance error
« 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


Offline i0n0s

  • Former Staff
  • ****
Re: Group distance error
« Reply #1 on: 28 Nov 2009, 13:29:28 »
Condition:
Code: [Select]
(leader grp1) distance h1 < 10

Offline eegore

  • Members
  • *
Re: Group distance error
« Reply #2 on: 29 Nov 2009, 03:11:16 »

  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.

Offline i0n0s

  • Former Staff
  • ****
Re: Group distance error
« Reply #3 on: 29 Nov 2009, 11:58:13 »
Code: [Select]
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.

Offline eegore

  • Members
  • *
Re: Group distance error
« Reply #4 on: 29 Nov 2009, 12:51:41 »

  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. 

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Group distance error
« Reply #5 on: 02 Dec 2009, 03:41:13 »
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.