Thing is I need to spawn in 2 men and get them into a brdm.
We don't want them to be grouped to anyone but themselves but I guess that doesn't matter.
We have this brdm patrolling a small area and if it dies, it respawns and creates men that respawn to the vehicle.
They always run after the person we group them to though and we can't figure out for the life of us, how to make them go to a waypoint and cycle between maybe 2-4 waypoints.
they just want to chase their group leader, unless i disableai "move" or group them to a gamelogic.
I am not familiar with setting waypoints in a script at all, but i have been trying for like 2 days now..lol..
I'm just hoping someone could spare me another long night of errors and maybe explain to me how i can get these two men i spawn in, named
brdmm1 and brdmm2, to go to waypoints and cycle between them.
I assume an execvm would be necessary with a looped file, setting waits at every waypoint, for about 60 seconds.
the vehicle and the people all spawn in with names..
the vehicle is named: brdm1
the driver is: brdmm1
the gunner is: brdmm2
as it is i have it set up with like this. "brdm.sqs"
?! (local server): exit
_vehicle = _this select 0
_delay = _this select 1
_pos = _this select 2
_dir = _this select 3
; defining possible vehicle positions
_driver = _vehicle emptypositions "driver"
_gunner = _vehicle emptypositions "gunner"
_commander = _vehicle emptypositions "Commander"
_crew = _vehicle emptypositions "Cargo"
? (_pos == 0): _startpos = getpos _vehicle
? (_dir == 361): _startdir = getdir _vehicle
#waiting
; waiting for Vehicle is disabled
@ !(canmove _vehicle) &! (canfire _vehicle)
; checking if vehicle still is manned
~_delay
? (canmove _vehicle) && (canfire _vehicle): goto "waiting"
_new = typeof _vehicle
deletevehicle _vehicle
brdm1 = _new createvehicle _startpos
brdm1 setpos _startpos
brdm1 setdir _startdir
[brdm1, _delay, _pos, _dir] exec "brdm1.sqs"
[] exec "rebrdm.sqf";
exit
then "rebrdm.sqf"
brdm11 is the name of the invisible heli marker we use, to spawn in the soliders at.
M2officer is the name of the man im grouping them to at the moment.
because I don't know how else to do it XD.
_unit=brdmm1;"SoldierWB" createUnit [brdm11, m2officer],brdmm1, 1, colonel;this setPos [getPos brdm11 select 0, getPos brdm11 select 1, (getPos this select 2) +0];this setBehaviour "aware";removeallweapons this;this addweapon nvgoggles;this moveindriver brdm1; this addEventHandler ["killed", { _Killer = _this select 1; _id=([man0] find _Killer)+1; if(_id>0)then{["punishmentevent", _id] call SPON_publishGlobalEvent;}}];
_unit=brdmm2;"SoldierWB" createUnit [brdm11, m2officer],brdmm2, 1, colonel;this setPos [getPos brdm11 select 0, getPos brdm11 select 1, (getPos this select 2) +0];this setBehaviour "aware";removeallweapons this;this addweapon nvgoggles;this moveingunner brdm1; this addEventHandler ["killed", { _Killer = _this select 1; _id=([man0] find _Killer)+1; if(_id>0)then{["punishmentevent", _id] call SPON_publishGlobalEvent;}}];
exit;
how could I execute another script to tell them where to cycle to please?
or merge it into these.. or ..anything that will get the job done?
We'd really appreciate the help..lol..
thanks..