I have the following script, which gets activated once a trigger gets activated. I have a gamelogic and an empty group that give the created unit/group its name and starting position.
_pos = _this select 0
_groupname = _this select 1
_tank = "AAV7" createvehicle (getpos _pos)
"SoldierWCrew" createUnit [(getpos _pos), _groupname, "", 0.7, "CAPTAIN"]
"SoldierWCrew" createUnit [(getpos _pos), _groupname, "", 0.7, "CAPTAIN"]
"SoldierWCrew" createUnit [(getpos _pos), _groupname, "", 0.7, "CAPTAIN"]
~0.5
((units _groupname) select 0) moveindriver _tank
((units _groupname) select 1) moveincommander _tank
((units _groupname) select 2) moveingunner _tank
exit
I want to expand this now, so that the AAV also has 4 Marine soldiers in its cargo. I experimented with this and tried the following:
_pos = _this select 0
_groupname = _this select 1
_tank = "AAV7" createvehicle (getpos _pos)
"SoldierWCrew" createUnit [(getpos _pos), _groupname, "", 0.7, "CAPTAIN"]
"SoldierWCrew" createUnit [(getpos _pos), _groupname, "", 0.7, "CAPTAIN"]
"SoldierWCrew" createUnit [(getpos _pos), _groupname, "", 0.7, "CAPTAIN"]
"SUCHusmcrifle" createUnit [(getpos _pos), _groupname, "", 0.7, "LIEUTENANT"]
~0.5
((units _groupname) select 0) moveindriver _tank
((units _groupname) select 1) moveincommander _tank
((units _groupname) select 2) moveingunner _tank
((units _groupname) select 3) moveincargo _tank
exit
This, however, didn't work.
So my questions are this:
1) How do I add soldiers to the cargo of the AAV?
2) Where is the individual units' "init" field?
3) How do I set the entire group's behaviour to "aware"? Is it
g1 setbehaviour "aware"
after I am finished with adding soldiers to the AAV (g1=groupname)?
4) How do I tell the group to go to the position of unitname and follow unitname wherever unitname goes?
Thanks a lot in advance