From 9f322a00473b07a463cac4bcaa7cdcd75b034a93 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Tue, 14 Jun 2016 12:53:08 +0100 Subject: [PATCH] Ryans Support Spawn a single zombie - Experimenting with cutter / object spawn. The idea being to create a 'hole' when a zed spawns in the road, one flat enough to not affect vehicles. --- .../epoch_code/compile/EPOCH_zombieSpawn.sqf | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Sources/epoch_code/compile/EPOCH_zombieSpawn.sqf diff --git a/Sources/epoch_code/compile/EPOCH_zombieSpawn.sqf b/Sources/epoch_code/compile/EPOCH_zombieSpawn.sqf new file mode 100644 index 00000000..b347ac79 --- /dev/null +++ b/Sources/epoch_code/compile/EPOCH_zombieSpawn.sqf @@ -0,0 +1,40 @@ +/* + Author: Andrew Gregory - EpochMod.com + + Contributors: + + Description: + Call a zombie. (Ryans required) + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/compile/EPOCH_zombieSpawn.sqf + + Example: + [] call EPOCH_zombieSpawn; + + Parameter(s): + + + Returns: + zedHandle +*/ +_zRange = getNumber (getMissionConfig "CfgEpochRyanZombie" >> "range"); +_disableAI = {{_this disableAI _x}forEach["TARGET","AUTOTARGET","FSM"];}; +_unitClass = selectRandom ["EPOCH_RyanZombie_1","EPOCH_RyanZombie_2","EPOCH_RyanZombie_3","EPOCH_RyanZombie_4","EPOCH_RyanZombie_5"]; +_unit = createAgent[_unitClass, position player, [], _zRange, "FORM"]; +_clutterPos = getPosATL _unit; +if!(isOnRoad _unit)then{ +createVehicle ["Land_Grave_dirt_F", _clutterPos, [], 0, "CAN_COLLIDE"]; +}; +_unit call _disableAI; +_unit switchMove "AmovPercMstpSnonWnonDnon_SaluteOut"; +_unit setmimic "dead"; +_unit setface (selectRandom ["RyanZombieFace1", "RyanZombieFace2", "RyanZombieFace3", "RyanZombieFace4", "RyanZombieFace5"]); +removegoggles _unit; +zedHandle = [_unit,true] execFSM "epoch_code\system\EPOCH_zombie_brain.fsm"; +_unit addEventHandler ["FiredNear", "(_this select 0) setVariable [""zFiredNear"",[_this select 1, _this select 2]];"]; +_unit addEventHandler ["Hit", "(_this select 0) setVariable [""zHit"",[_this select 1, _this select 2]];"]; +//if(isNil "axeFlag")then{ axeFlag = createVehicle ["Flag_Blue_F", (getpos player), [], 10, "CAN_COLLIDE"];};