Home   Help Search Login Register  

Author Topic: Arrays question (Answered)  (Read 1187 times)

0 Members and 1 Guest are viewing this topic.

Offline eegore

  • Members
  • *
Arrays question (Answered)
« on: 21 Mar 2008, 05:09:31 »
  Man taking a 2 year break from the game is killing me, I am really glad all this info is on here. 

  Anyway I finally figured out that the Reader doesn't recognize notepad style quotes and I had to retype scripts in Chris' OFP Editor to get them to work although I still screw a lot up.

  However I am wondering if there is a way to add a group of men to a truck (MoveinCargo) without having to type this command into all 20 units?  Is this an Array issue? I am currently trying to figure out how this Array thing works.  I read few tutorials and did a search but haven't found anything that uses WP's to send a group into a truck without typing the AddCargo command into every unit.

  I tried  grp = groupthis  in the group leaders Init: but it still only puts him in the truck.

  Thanks for any help on this.
« Last Edit: 21 Mar 2008, 20:03:30 by eegore »

Offline Denz

  • Former Staff
  • ****
Re: Arrays question
« Reply #1 on: 21 Mar 2008, 10:42:16 »
You mean like this
Code: [Select]
{_x moveInCargo vehiclename} forEach units group this
Put it in the init line of one of the group members


edit:
sorry didn't read the question fully  :whistle:
You can add that to a waypoint too as long as you have already grouped them
« Last Edit: 21 Mar 2008, 10:46:35 by Denz »
I've got 'em right where I want 'em - surrounded from the inside!
Jerry "Mad Dog" Shriver, SOG Recon One-Zero
24/09/41 - 24/04/69

Offline eegore

  • Members
  • *
Re: Arrays question
« Reply #2 on: 21 Mar 2008, 18:15:30 »

  Thanks for the quick reply, that worked perfectly.

  The only thing I have left is figuring out how to make a trigger work when only the player goes into the radius so my guys aren't setting it off if they run out ahead of me.

  Thanks again.

Offline Denz

  • Former Staff
  • ****
Re: Arrays question
« Reply #3 on: 21 Mar 2008, 19:21:12 »
If you group the player with the trigger you can then edit the trigger to only activate for the group leader
I've got 'em right where I want 'em - surrounded from the inside!
Jerry "Mad Dog" Shriver, SOG Recon One-Zero
24/09/41 - 24/04/69

Offline eegore

  • Members
  • *
Re: Arrays question
« Reply #4 on: 21 Mar 2008, 20:02:34 »
 
  I was trying to Synch the trigger with the Player somehow, should of thought to group them.  I'll draw a group line to the player unit and see what happens.

  Thanks.