Jump to content
Sign in to follow this  
RS30002

Spawn issue involving sides???

Recommended Posts

Hi all

 

So....i have a spawn script to spawn Chinese marines (the ones with the silly blue uniforms - mission is on a SCS island map).

 

The script makes them east when they spawn (ind by default).

But.....idk what happens, the first one or two that spawn just start spraying bullets for a second after spawning and then stop. One or two dies from this, maybe some have wounds but all of them are mucking about the spawn point looking for the enemy (i think) instead of running to the marker like how they're supposed to.

 

So i think what is happening is they spawn, but the script doesn't assign them to east fast enough? They get a few shots off and ruin it for everyone.

 

_marinedefenders1 = [];

if (isServer) then {


_marinedefenders1 = [getmarkerpos "PLANtent1", EAST, ["O_T_Soldier_SL_F","O_T_Soldier_F","O_T_Soldier_LAT_F","O_T_Soldier_TL_F","O_T_Soldier_M_F","O_T_Soldier_AR_F","O_T_Soldier_A_F","O_T_Medic_F","O_T_Soldier_AAA_F","O_T_Soldier_GL_F","O_T_Soldier_AR_F","O_T_Soldier_GL_F","O_T_Soldier_AT_F","O_T_Soldier_Repair_F","O_T_Soldier_M_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;

_wp1 = _marinedefenders1 addWaypoint [getmarkerpos "PLANairWP1", 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "LIMITED";
_wp1 setWaypointFormation "LINE";
_wp1 setWaypointBehaviour "AWARE";

_wp2 = _marinedefenders1 addWaypoint [(getmarkerpos "PLANhqWP"), 0];
_wp2 setWaypointType "MOVE";


_wp3 = _marinedefenders1 addWaypoint [(getmarkerpos "PLANradarWP"), 0];
_wp3 setWaypointType "MOVE";


_wp4 = _marinedefenders1 addWaypoint [(getmarkerpos "PLANhelipadWP"), 0];
_wp4 setWaypointType "MOVE";


_wp4 = _marinedefenders1 addWaypoint [(getmarkerpos "PLANbaseAAWP"), 0];
_wp4 setWaypointType "CYCLE";

The spawn code, pls don't judge, it's from youtube! (also, by now CSAT troops are listed, i removed the blue uniform guys for testing - yes the CSAT guys don't spray each other with bullets after spawn)

 

How would i make the east faster???

 

Thanks in advance for any help. 🍻

Share this post


Link to post
Share on other sites

Hey, I don't see any glaring problems with that snippet so I suspect there is some other script or mod interfering.

As a workaround, you can spawn CSAT units and then set loadout for each unit in the group like this

_unit setUnitLoadout (getUnitLoadout "MARINE_UNIT_CLASSNAME");

 

Share this post


Link to post
Share on other sites

Ya, i thought of that, but dunno how to insert the code you posted into my code in such a way that soldiers get different loadouts, ie gunner, AA, AT, officer etc etc

 

If i do it like this idk if it's gonna work and if it is all of them will have the same loadout

_marinedefenders1 = [getmarkerpos "PLANtent1", EAST, ["O_T_Soldier_SL_F","O_T_Soldier_F","O_T_So

_marinedefenders1 setUnitLoadout (getUnitLoadout "MARINE_UNIT_CLASSNAME");

 

Will try something now, have time, thanks for the reply 🍻

 

Share this post


Link to post
Share on other sites
11 hours ago, Rok Stuhne said:

The script makes them east when they spawn (ind by default).

 

If they are Indy by config default and you're spawning them to East, the issue most likely is that BIS_fnc_spawnGroup uses Syntax 1 (main syntax) of createUnit,

	_unit = _grp createUnit [_type, _itemPos, [], 0, "FORM"];

and you're having them created in a group not consistent with their config side.

 

First spawn them for their config side, then have them join a new created East group.

  • Like 3

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  

×