Jump to content
Sign in to follow this  
manzilla

Help- Enemy Paradrop reinforcements via script

Recommended Posts

Can some help me with this script.

I have this but would like to change the last spawned group to a heli that spawns with a group of enemy units inside(listed above in the other spawned group.) and when it gets to the last wp(wp2_2) have the group para drop out.

The group then runs this script:

http://forums.bistudio.com/showthread.php?t=87129

and the heli continues on to another wp in seek and destroy mode.

Basically I just want the last spawned group to be replaced by the para group and heli.

Here's what I have so far:

_grp2 = [position spawngroup1, east,["Ins_Soldier_CO", "Ins_Soldier_Medic", "Ins_Soldier_AT", "Ins_Soldier_AA", "Ins_Soldier_MG", "Ins_Soldier_GL", "Ins_Soldier_AR", "Ins_Soldier_Sab", "Ins_Soldier_Sniper"]] call BIS_fnc_spawnGroup;
_wp = _grp2 addWaypoint [position wp1_1, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";
_wp = _grp2 addWaypoint [position wp2_1, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";

_grp3 = [position spawngroup2, east,["Mi17_Ins", "Mi17_Ins"]] call BIS_fnc_spawnGroup;
_wp = _grp3 addWaypoint [position wp1_2, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";
_wp = _grp3 addWaypoint [position wp2_2, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";

(This code is not mine. I got it from this forum but can't remember who. My apologies.)

Sorry for this big request but I can't seem to figure it out via the comref or anything else. Yup, I'm a bit dense. ;)

Thanks in advance.

Share this post


Link to post
Share on other sites

Hi! If I understand what you want here it is probably the code for you:

_grp2 = [position spawngroup1, east,["Ins_Soldier_CO", "Ins_Soldier_Medic", "Ins_Soldier_AT", "Ins_Soldier_AA", "Ins_Soldier_MG", "Ins_Soldier_GL", "Ins_Soldier_AR", "Ins_Soldier_Sab", "Ins_Soldier_Sniper"]] call BIS_fnc_spawnGroup;
_wp = _grp2 addWaypoint [position wp1_1, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";
_wp = _grp2 addWaypoint [position wp2_1, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";

_grp3 = [position spawngroup2, east,["Mi17_Ins", "Mi17_Ins"]] call BIS_fnc_spawnGroup;

//select the first Mi17 of the secondgroup and put its reference in a local variable named _heli
_heli = (units _grp3) select 0;

//make units of the first spawned group (_grp2) to getin the chopper (_heli)
{_x moveInCargo _heli} forEach (units _grp2);

_wp = _grp3 addWaypoint [position wp1_2, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";
_wp = _grp3 addWaypoint [position wp2_2, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";

//set the waypoint (wp2_2) to eject the units in _heli
_wp setWaypointStatements ["true", "{ _x action ['eject', vehicle _x] } forEach (units _grp2)"];

Edited by goliath86

Share this post


Link to post
Share on other sites

Thanks a lot bud!

Problem though. The helis spawn alright but the 2nd group doesn't jump out at the helis's 2nd wp. It doesn't look like the 2nd group is being added to the heli.

Any ideas?

EDIT:

Is this doing it?

From the group to spawn line:

position spawngroup1

Edited by Manzilla

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×