Home   Help Search Login Register  

Author Topic: spawn group and ai group control location radius question?  (Read 1346 times)

0 Members and 1 Guest are viewing this topic.

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
I have a grouping question...I'll try my best to explain. I have heard if you add troops to your mission via a spawn_unit script, you need to be sure to group the units you create...easy enough - except when I group the spawned ai to a misc east unit named EAST1 i've place somewhere on the map, the spawned ai runs towards the the unit named EAST1 that's located miles away. For now i have it group the unit then grpnull - but im pretty sure that's not right  :whistle:
...anyone know a solution?

Code: [Select]
_A="SquadleaderE" createunit [[0,0,0], group EAST1]
_unit = nearestobject [[0,0,0],"SquadleaderE"]
[_unit] join grpnull
_unit setpos [(getpos EBAR select 0) - 15 + random 30, (getpos EBAR select 1) - 15 + random 30, (getpos EBAR select 2) + 0]
_unit setcombatmode "RED";
_unit setbehaviour "AWARE"
_unit domove getpos WESTBASE
~3

Also - while I have your attention, the above sends the unit to location WESTBASE, anyone know how to make the unit cycle thru 5 or 6 or 10 locations? And is there a way to increase the radius of the domove position? (the ai all swarm over a 1x1 square @ westbase :P)

As always, thanks in advance.
just setpos & forgetpos!