Jump to content
total

Spawn Script problems

Recommended Posts

Private ["_grp1", "_grp2", "_grp3", "_grp4", "_grp5", "_grp6", "_grp7", "_grp8", "_grp9", "_grp10"];
if (! isServer && hasInterface) exitwith {};
hint "HC Spawn test!";

    _sideHQ = createCenter east;

//Zone 1
_grp1 = createGroup east;
_grp1 = [getMarkerPos "spawn1_1", _sideHQ, ["rhs_msv_emr_sergeant", "rhs_msv_emr_rifleman", "rhs_msv_emr_medic"], [], [], [0.3, 0.6]] call BIS_fnc_spawnGroup;
nul = [leader _grp1,"zone1","RANDOM"] execVM "scripts\UPSMON.sqf";
{_x removeallweapons; _x addweapon "arifle_mas_ak12_sf_gl_h"; _x addPrimaryWeaponItem "acc_flashlight"; _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; _x enablegunlights "forceOn"; } foreach units _grp1;

Why doesn't this code work? No weapons removed and no weapons/items added.

Share this post


Link to post
Share on other sites


{

removeallweapons _x;

_x addweapon "arifle_mas_ak12_sf_gl_h";

_x addPrimaryWeaponItem "acc_flashlight";

_x unassignItem "NVGoggles";

_x removeItem "NVGoggles";

_x enableGunLights "forceOn";

} foreach units _grp1;

Share this post


Link to post
Share on other sites

What kind of code do I have to use to spawn a vehicle with the crew sitting ready inside the vehicle? Everytime I try to create a vehicle it's empty.

Share this post


Link to post
Share on other sites


_enemyposition = [getMarkerPos "markername", 250, 450, 10, 0, 0, 0] call BIS_fnc_findSafePos;
_vehicles = createGroup EAST;
[_enemyposition, 10, "O_MRAP_02_hmg_F", _vehicles] call BIS_fnc_spawnvehicle;
[_vehicles,getMarkerPos "markername", 100] call BIS_fnc_taskPatrol;

or extract it from cfgGroups

_enemygroup3 = [_enemyposition, resistance, (configfile >> "CfgGroups" >> "Indep" >> "LOP_AM" >> "Motorized" >> "LOP_AM_Motor_squad_LR")] call BIS_fnc_spawnGroup;
[_enemygroup3,getMarkerPos "markername", 100] call BIS_fnc_taskPatrol;

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

×