lmapper Posted May 25, 2014 Report Share Posted May 25, 2014 How to spawn zombies in extacly coords ? infistar can it, but i cant find this code. thx. Link to comment Share on other sites More sharing options...
0 axeman Posted May 25, 2014 Report Share Posted May 25, 2014 This should suffice (Not tested but based off my zombie horde code): /* For DayZ Epoch Single Zed spawn by axeman */ private ["_zedTypes","_zedType","_zedPos","_agent","_zedTarget"]; _zedTypes = ["pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"]; _zedPos = [6642.4,2439.6,0];//Position to spawn the Zed - Chernogorsk Central Garden _zedTarget = [5956,7960,0];//Give the poor zed somewhere to walk to - Somewhere near Stary Sobor _zedType = _zedTypes call BIS_fnc_selectRandom; _agent = createAgent [_zedType, _zedPos, [], 40, "NONE"]; _agent disableAI "FSM"; _agent disableAI "AUTOTARGET"; _agent setBehaviour "COMBAT"; _agent setCombatMode "GREEN"; _agent setSkill 0; _agent setUnitPos "UP"; _agent moveTo _zedTarget; _agent forceSpeed 2; [_zedPos,_agent,_zedTarget] execFSM "\z\addons\dayz_code\system\zombie_agent.fsm";//Set the normal Zed behaviour insertcoins and raymix 2 Link to comment Share on other sites More sharing options...
0 lmapper Posted May 25, 2014 Author Report Share Posted May 25, 2014 This should suffice (Not tested but based off my zombie horde code): /* For DayZ Epoch Single Zed spawn by axeman */ private ["_zedTypes","_zedType","_zedPos","_agent","_zedTarget"]; _zedTypes = ["pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"]; _zedPos = [6642.4,2439.6,0];//Position to spawn the Zed - Chernogorsk Central Garden _zedTarget = [5956,7960,0];//Give the poor zed somewhere to walk to - Somewhere near Stary Sobor _zedType = _zedTypes call BIS_fnc_selectRandom; _agent = createAgent [_zedType, _zedPos, [], 40, "NONE"]; _agent disableAI "FSM"; _agent disableAI "AUTOTARGET"; _agent setBehaviour "COMBAT"; _agent setCombatMode "GREEN"; _agent setSkill 0; _agent setUnitPos "UP"; _agent moveTo _zedTarget; _agent forceSpeed 2; [_zedPos,_agent,_zedTarget] execFSM "\z\addons\dayz_code\system\zombie_agent.fsm";//Set the normal Zed behaviour thx. I'll try it. Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 ok this seems like an interesting script to add, how would one add this ? can this work in a few differnt locations and set to spawn like every hour? Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 ok this seems like an interesting script to add, how would one add this ? can this work in a few differnt locations and set to spawn like every hour? Probably, but spawning in a horde of zombies without anyone near is a server drag. Best to have multiple locations with triggers Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 so would i need to put the script into an sqf like [ zombies.sqf ] and put [ execVM "zombies.sqf";] ? ofc without the [ ] or does it need to be else where? Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 you want a trigger or a server side spawn method? Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 if its possible for both Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 i like the idea of a zombie horde coming towards players and them running the other direction and needing a change of undies Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 Im not sure how one would go about setting up the server side way, but the trigger way is easy. (copy paste off off user ebay I believe) Make a trigger: class Item16 { position[]={11787.4,0.001,12674.5}; // database cords, xyz a=100; b=100; activationBy="ANY"; repeating=1; // every one who enters the area after this spawns an additional horde interruptable=1; age="UNKNOWN"; name="ZombleSpawnTrigger"; expCond="(vehicle player) in thislist;"; expActiv="zomblespawnt = [] execVM ""map_addons\zombies\1.sqf"";"; expDesactiv="terminate zomblespawnt;"; class Effects { }; }; now, make an sqf file called 1.sqf, with this in it: _zombletypes = [ "zZombie_Base", "z_worker1", "z_worker2", "z_worker3", "z_villager1", "z_villager2", "z_villager3", "z_suit1", "z_suit2", "z_soldier", "z_soldier_heavy", "z_soldier_pilot", "z_policeman", "z_teacher", "z_doctor", "z_hunter", "z_priest" ]; _zomblesposition = [13616.088,3153.3975,5.3405762e-005]; //where you want the zombies to spawn, this location is xzy _i = 1; for "_i" from 1 to 30 do // spawns between 1 and 30 zombies { _genzombles = _zombletypes call BIS_fnc_selectRandom; _agent = createAgent [_genzombles, _zomblesposition, [], 10, "NONE"]; _zombleselectedpos = getPosATL _agent; [_zombleselectedpos,_agent] execFSM "\z\addons\dayz_code\system\zombie_agent.fsm"; }; and save that file in the mission file: map_addons\zombies\ upload, restart, happy tears lmapper and Incar 2 Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 alternatively, you could set it up with /* For DayZ Epoch Single Zed spawn by axeman */ private ["_zedTypes","_zedType","_zedPos","_agent","_zedTarget"]; _zedTypes = ["pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"]; _zedPos = [6642.4,2439.6,0];//Position to spawn the Zed - Chernogorsk Central Garden _zedTarget = [5956,7960,0];//Give the poor zed somewhere to walk to - Somewhere near Stary Sobor _zedType = _zedTypes call BIS_fnc_selectRandom; _agent = createAgent [_zedType, _zedPos, [], 40, "NONE"]; _agent disableAI "FSM"; _agent disableAI "AUTOTARGET"; _agent setBehaviour "COMBAT"; _agent setCombatMode "GREEN"; _agent setSkill 0; _agent setUnitPos "UP"; _agent moveTo _zedTarget; _agent forceSpeed 2; [_zedPos,_agent,_zedTarget] execFSM "\z\addons\dayz_code\system\zombie_agent.fsm";//Set the normal Zed behaviour just be sure you adjust the cords Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 thank for the help dude ill give this a go but just woundering can i set waypoint from town to town? Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 ok the alternitive seems to have the waypoint so i guess that would go in the 1.sqf? Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 if you want the zombies to spawn in a specific area and not walk from town to town, place the 1st one in 1.sqf. If you want em to walk from town to town, place the 2nd. Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 thanks again dude but one last thing im asuming the trigger is in the mission.sqm? i know im noob with scripting Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 thanks again dude but one last thing im asuming the trigger is in the mission.sqm? i know im noob with scripting Oh, yeah sorry! Be sure to update your class numbers correctly Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 so do i replace class Item16 { position[]={5133.0991,0.96998656,-3091.2974}; azimut=-17.083944; id=4; side="WEST"; vehicle="Survivor1_DZ"; player="PLAY CDG"; skill=0.60000002; init="this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this disableAI 'MOVE';"; or is that the wrong place? Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 Nooooooo, post your mission.sqm (in pastebin plz) and I'll add it for you (with explanation what I did) Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 thanks alot for the help dude means alot http://pastebin.com/KY0jeyvz Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 11, 2014 Report Share Posted June 11, 2014 http://pastebin.com/xFcqXk37 be sure to edit the cords Link to comment Share on other sites More sharing options...
0 axeman Posted June 11, 2014 Report Share Posted June 11, 2014 They won't follow way points as they are agents, only units do. If you want them to move use moveto https://community.bistudio.com/wiki/moveTo . Though the Zombie_agent.fsm will effect their behavior and most likely will keep them local. Link to comment Share on other sites More sharing options...
0 Incar Posted June 11, 2014 Report Share Posted June 11, 2014 I might make use of this sometime, was hoping to add traveling hordes to my server. Have a small question though, does... a=100; b=100; determine the activation range around the trigger coord? Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 11, 2014 Report Share Posted June 11, 2014 Thanks again insertcoins you have been a big help Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 13, 2014 Report Share Posted June 13, 2014 still not got this working yet (moved the trigger from above markers to sensors dues to error "cannot load mission") is there a way when to trigger activates it can give a message ingame? i dont see anyting in the rpt to do with the trigger or 1.sqf Link to comment Share on other sites More sharing options...
0 insertcoins Posted June 13, 2014 Report Share Posted June 13, 2014 still not got this working yet (moved the trigger from above markers to sensors dues to error "cannot load mission") is there a way when to trigger activates it can give a message ingame? i dont see anyting in the rpt to do with the trigger or 1.sqf you can add a line that tell the server the script is initiated so it shows in the rtp post your mission.sqm to see if you made any errors placing it/I made any errors explaining it. Link to comment Share on other sites More sharing options...
0 reaperxt666 Posted June 13, 2014 Report Share Posted June 13, 2014 http://pastebin.com/w0BuEWGa Link to comment Share on other sites More sharing options...
Question
lmapper
How to spawn zombies in extacly coords ?
infistar can it, but i cant find this code.
thx.
Link to comment
Share on other sites
31 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now