Home   Help Search Login Register  

Author Topic: join command help  (Read 1323 times)

0 Members and 1 Guest are viewing this topic.

Offline DOA

  • Members
  • *
  • ArmA 2 Rules - Nothing else comes close!
    • The Graveyard Shift
join command help
« on: 22 Sep 2005, 22:07:59 »
Hi everyone,
Thanks in advance for you time and help.

I am working on a MP mission where a 10 man group of Rangers are inserted near a small town.  This group "Alpha_Blue" sweeps the town while a second 2 man group flies cover in a helicopter gunship. Both of these groups can be live players or AI. 12 total slots all with respawn. When the town is clear Alpha_Blue calls in another chopper for extraction back to base.

My problem:  If the covering gunship catches an RPG and goes down, I want the respawning Pilot and Gunner to join Alpha_Blue rather than just walk through the rest of their waypoints. I have set up a trigger to activate when the pilots dammage is >=1. I am trying to use the join command to get them to join grpNull then join Alpha_Blue, either in a trigger activation or in a script; but, I must be missing something in the syntax or using the join command incorrectly. Can some one shove me in the right direction?

The pilot and gunner in the gunship are named a1 and a2.

Trigger condition: GetDammage a1 > = 1
on Activation: "4" objStatus "Failed";  a1 join grpNull; a2 join grpNull; a1 join Alpha_Blue; a2 join Alpha_blue

When the trigger detects a1 dead, it sets the objective as failed; but, the pilot and gunner stay in their own group and I get an error  "Expected array"

Am I headed down the right path to accomplish this? Thanks..DOA
« Last Edit: 22 Sep 2005, 22:15:27 by DOA »
ArmA 2 - Nothing else comes close!
--
DOA

Offline Pilot

  • Contributing Member
  • **
Re:join command help
« Reply #1 on: 22 Sep 2005, 22:23:27 »
units joining groups must be an in array (in [])

Use this code:
on Activation: "4" objStatus "Failed";  [a1] join grpNull; [a2] join grpNull; [a1, a2] join Alpha_Blue;

-Student Pilot

Offline DOA

  • Members
  • *
  • ArmA 2 Rules - Nothing else comes close!
    • The Graveyard Shift
Re:join command help
« Reply #2 on: 22 Sep 2005, 23:10:34 »
Outstanding Student Pilot. That did it.  I pasted in your code and started up the mission.  I played the leader of the rangers and we began sweeping the town as the gunship flew overhead. Unlike the last 1000 times I ran this mission; the AI was doing very well in the gunship. In fact I was begining to think I needed to shoot it down myself to test the join thing. The AI are usually shot down fairly quickly.  Anyway; a1 finally got killed and it worked as advertized. Thank you very much...DOA
ArmA 2 - Nothing else comes close!
--
DOA