jstibbsy 55 Posted August 12, 2017 Hello, I'm currently trying to get Ryan's zombies to spawn with custom clothes after they are manually spawned. There's a select random class in varibles.sqf which works fine (not my code) slowZombies = [ "RyanZombieC_man_1slowOpfor", "RyanZombieC_man_hunter_1_FslowOpfor", "RyanZombieC_man_pilot_FslowOpfor", "RyanZombieC_journalist_FslowOpfor", "RyanZombieC_OrestesslowOpfor", "RyanZombieC_NikosslowOpfor", "RyanZombieC_man_polo_1_FslowOpfor", "RyanZombieC_man_polo_2_FslowOpfor", "RyanZombieC_man_polo_4_FslowOpfor", "RyanZombieC_man_polo_5_FslowOpfor", "RyanZombieC_man_polo_6_FslowOpfor", "RyanZombieC_man_p_fugitive_FslowOpfor", "RyanZombieC_man_w_worker_FslowOpfor", "RyanZombieC_scientist_FslowOpfor", "RyanZombieB_Soldier_05_fslowOpfor", "RyanZombieB_RangeMaster_FslowOpfor", "RyanZombieB_Soldier_02_fslowOpfor", "RyanZombieB_Soldier_lite_FslowOpfor", "RyanZombieB_Soldier_lite_F_1slowOpfor", "RyanZombieB_Soldier_02_f_1slowOpfor" ]; Now it selects one of those zombies into the spawner and then spawns it in but I want to add custom clothes (ww2 clothes) to them. Here's a the zombieSpawner.sqf (again mostly not my code) private ["_zombie","_spawnPoint","_marker"]; _uniform = ["U_LIB_GER_Soldier_camo4"]; _headgear = ["H_LIB_GER_HelmetCamo2"]; _vest = ["V_LIB_GER_VestSTG"]; while {true} do { waitUntil {zombiesAlive < 1}; roundNum = roundNum + 1; zombiesAlive = 0; missionNamespace setVariable ["roundNum", roundNum]; publicVariable "roundNum"; _marker = createMarker ["respawn_west", getMarkerPos "respawn_spawn"]; _marker setMarkerColor "ColorWEST"; _marker setMarkerType "mil_circle"; waitUntil {missionNamespace getVariable ["GameBegin",0] == 1};//wait for first player to be ready if (roundNum % 5 == 0 && count allPlayers > 2) then { missionNamespace setVariable ["Demonround", roundNum]; publicVariable "Demonround"; uiSleep 10; zombiesAlive = 1; //for "_i" from 1 to (roundNum / 5) do //{ _spawnPoint = zombieSpawns call BIS_fnc_selectRandom; "RyanZombieboss1" createUnit [getMarkerPos _spawnPoint, zombieGroup, "this switchmove 'AmovPercMstpSnonWnonDnon_SaluteOut'; this setpos [(getpos this select 0) + random 15 - random 15, (getpos this select 1) + random 15 - random 15]; this addEventHandler ['killed', {[_this] spawn killed_zombie }]; this addEventHandler ['HandleDamage', {if (alive (_this select 0) and (_this select 1) isEqualTo 'neck') then {(_this select 3) setVariable ['money', ((_this select 3) getVariable 'money') + moneyOnDamage, true];};}];"]; //}; } else { missionNamespace setVariable ["RoundEnd", roundNum]; publicVariable "RoundEnd"; uiSleep 10; }; deleteMarker _marker; //spawn slow zombies for "_i" from 1 to ((rounds select roundNum) select 0) do { waitUntil {zombiesAlive < enemyMax}; _spawnPoint = zombieSpawns call BIS_fnc_selectRandom; _zombie = slowZombies call BIS_fnc_selectRandom; //_zombieObj = missionNamespace getVariable [_zombie, objNull]; _randomhat = _headgear call BIS_fnc_selectRandom; _randomuniform = _uniform call BIS_fnc_selectRandom; _randomvest = _vest call BIS_fnc_selectRandom; zombiesAlive = zombiesAlive + 1; _zombie createUnit [getMarkerPos _spawnPoint, zombieGroup, "this switchmove 'AmovPercMstpSnonWnonDnon_SaluteOut'; this setpos [(getpos this select 0) + random 15 - random 15, (getpos this select 1) + random 15 - random 15]; removeHeadgear this; removeVest this; removeUniform this; this addHeadgear _randomhat; this addUniform _randomuniform; this addvest _randomvest; this addEventHandler ['killed', {[_this] spawn killed_zombie }]; this addEventHandler ['HandleDamage', {if (alive (_this select 0) and (_this select 1) isEqualTo 'neck') then {(_this select 3) setVariable ['money', ((_this select 3) getVariable 'money') + moneyOnDamage, true];};}];"]; }; Now what it should be doing is removing the clothes from the zombies ONCE they spawn but it only refits them with the Headgear and backpack. So is there a way to remove clothes for ryan zombies? Everything else looks and works perfectly except this. Credit for code: Nazi Zombies on steam EDIT: So I tried forceadduniform and removed removeUniform and it sorta works. The Zombies have the clothes but now they don't move. Share this post Link to post Share on other sites
accuracythruvolume 547 Posted August 14, 2017 I believe that you are creating some unintended effects. The mod uses custom uniforms linked with the custom animations. By removing said uniform, you are removing all of the custom-zombiefied-ness. Share this post Link to post Share on other sites