Home   Help Search Login Register  

Author Topic: AI will not follow: Disband group > Join and lead another unit.  (Read 1387 times)

0 Members and 1 Guest are viewing this topic.

big_ears

  • Guest
Hi,
I am attempting to make a mission designed for multiplayer however I wish to leave it open for 1-3 people, just however many you want.  My problem relates to how (when only 1/2 people are playing) the AI will not follow their given waypoints.  

To help me explain I will give you some background to what I am doing:

I want 3 Black Ops (all in one group, these are the players) to attack a town.  Then (once enemy dead in first town) drive to another town.
When they get there and get out of the car I want them to disband into 3 seperate groups and then I want them to JOIN and LEAD 3 groups at the second base.  

First of all I tried to make them all join the null group, then join the respective groups however they would not become the leader.  

I tried to make them leader of that group - they became leader and when I played as each different black op, they then get the waypoints of the group they had joined and now led.  However when the AI is in control of the Black Op they just climb back into the car we came in... and sit there.  Not driving just sitting there.  

I have played around with putting the scripts in a different order, changing their groups at a differetn time etc, however ultimatly they will always return to that car???  

So in summary: after they have gotten out of the car they get control and lead a group standing by (consisting of only 5 people, so its not a too many units thing).  Then while I play I see the waypoint simply saying DESTROY a specific truck and the other groups get orders to destroy or move somewhere else, the AI players choose to get back into the car and sit there, leaving their unit in formation outside the car.  

If anybody has any ideas as to something I am missing (I am only new at missions/scripting) or know what and where somthing is wrong I would greatly appreciate it.  

Many thanks.  

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net



stage A
Have the player join the group

stage B
Have all the units less the player leave the group

stage C
Have all these non player units rejoin the group.

This way you never lose the group that the waypoints are attached too and the player becomes the leader of the group


Quote
[Player] join groupname
_squad = units groupname
_squad = _squad - [Player]
_squad join grpnull
_squad join groupname
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Blanco

  • Former Staff
  • ****
Should work what Terox said.
There is a script in the editordepot that does this :
http://www.ofpec.com/editors/resource_view.php?id=770

Search or search or search before you ask.

big_ears

  • Guest
Thanks for that people!!  I played around with it and changed where and when the groups join (in relation to the waypoints) and used that stage A,B,C method (thanks Terox).  

Yeah the becomeldr.sqs script > I had found that one and using that straight up made them jump into the car ???  But now i've changed the way it goes so the Supporting Unit joins the Player, rather than the player joining the supporting unit and then becoming leader.  Not sure why I didn't think of that haha.  But anyways problem solved.  Thanks again.