UKSubmariner 0 Posted May 30, 2005 Does anyone know where I could find a script to have zombies spawning near the player? I've half finished a mission, and this is all I need to complete it for final release... Cheers! Share this post Link to post Share on other sites
D.murphy man 0 Posted May 30, 2005 This will spawn 12 zombies a given location Quote[/b] ]_A = 0_trig=_this select 0 _zombiegroup=_this select 1 #HardAttack _A=_A+1 _zombiesIwannaspawn = ["zombieex1", "zombieex2", "zombieex3", "zombieex4", "zombieex5", "zombieex6", "Zombieexwoman1", "zombieexwoman4", "zombieexwoman3", "zombieex7", "Zombieex8", "Zombieex9"] _y = 0 #loop ? _y >= count _zombiesIwannaspawn: exit _u = _zombiesIwannaspawn select _y _u CreateUnit [getpos _trig, _zombiegroup] ~1 _y = _y + 1 goto "loop" Place this in a .sqs file, call it spawn.sqs or what ever you like and place it in your mission directory. Then the simplest way to activate this would be by placeing a trigger, activated by who ever you want. place in the on activation field [Zombiegroupname,Triggername] exec "scriptname.sqs" Zombiegroupname = The name of a unit on the map, id recomend that you place a unit thats the enemy to what ever side the player is on. Place the unit on a far off island and name him Zombiegroup1 or what ever you want. Trigger name=name of the trigger Scriptname.sqs = the name of the .Sqs with the code in ive given you. I am presumeing that you are useing the Unified zombie mod correct? Other notes: Useing this you cannot spawn more then 12 zombies at a time useing only one zombiegroup (due to OFP having a 12 units per squad limit). If you want to spawn more in a trigger simply put [zombiegroupname1,triggername] exec "spawn.sqs";[zombiegroupname2,triggername] exec "spawn.sqs";ect... Make sure to place more Units on a far of island with Zombiegroupname1,2,3,ect.. Share this post Link to post Share on other sites
UKSubmariner 0 Posted May 30, 2005 Yeah... I thought Farmland Island needed some Zombie action.. no-one appears to have used it yet... Cheers man, I've been dieing to get my mits on a spawn script! Share this post Link to post Share on other sites
D.murphy man 0 Posted May 30, 2005 Farmland mod released an island! I never knew about this? dosent say any thing on their site, inless it comes in one of the addon packs? Edit: O0o just did a search on OFP.cz and found it, nice D/ling now. Looks like ill be having some zombie fun also Share this post Link to post Share on other sites
UKSubmariner 0 Posted June 27, 2005 Cheers again D.Murphy man.. just one last question.. What is it you used to make the fog creep in so damn close? Share this post Link to post Share on other sites
D.murphy man 0 Posted June 27, 2005 0 setfog 1 the 0 part is the time (in seconds) it takes for the fog to gradually appear, and 1 is the 'thickness' of the fog, 1 being really thick, and 0 being no fog at all. If you want somthing inbetween just put 0.5 or what ever number ya like after the point. Share this post Link to post Share on other sites
NeMeSiS 11 Posted June 27, 2005 This will spawn 12 zombies a given locationQuote[/b] ]_A = 0_trig=_this select 0 _zombiegroup=_this select 1 #HardAttack _A=_A+1 _zombiesIwannaspawn = ["zombieex1", "zombieex2", "zombieex3", "zombieex4", "zombieex5", "zombieex6", "Zombieexwoman1", "zombieexwoman4", "zombieexwoman3", "zombieex7", "Zombieex8", "Zombieex9"] _y = 0 #loop ? _y >= count _zombiesIwannaspawn: exit _u = _zombiesIwannaspawn select _y _u CreateUnit [getpos _trig, _zombiegroup] ~1 _y = _y + 1 goto "loop" Place this in a .sqs file, call it spawn.sqs or what ever you like and place it in your mission directory. Then the simplest way to activate this would be by placeing a trigger, activated by who ever you want. place in the on activation field [Zombiegroupname,Triggername] exec "scriptname.sqs" Zombiegroupname = The name of a unit on the map, id recomend that you place a unit thats the enemy to what ever side the player is on. Place the unit on a far off island and name him Zombiegroup1 or what ever you want. Trigger name=name of the trigger Scriptname.sqs = the name of the .Sqs with the code in ive given you. I am presumeing that you are useing the Unified zombie mod correct? Other notes: Useing this you cannot spawn more then 12 zombies at a time useing only one zombiegroup (due to OFP having a 12 units per squad limit). If you want to spawn more in a trigger simply put [zombiegroupname1,triggername] exec "spawn.sqs";[zombiegroupname2,triggername] exec "spawn.sqs";ect... Make sure to place more Units on a far of island with Zombiegroupname1,2,3,ect.. is it possible to add something like _zombiesIwannaspawn join grpnull or something? cuz i dont like making 100000 groups.. Share this post Link to post Share on other sites
D.murphy man 0 Posted June 27, 2005 you can replace the part : Quote[/b] ]_u CreateUnit [getpos _trig, _zombiegroup] With: Quote[/b] ]_u CreateUnit [getpos _trig, _zombiegroup,"This join grpnull"] Or if that done work Quote[/b] ]_u CreateUnit [getpos _trig, _zombiegroup,"zombiedude1=this;zombiedude join grpnull"] Share this post Link to post Share on other sites
NeMeSiS 11 Posted June 27, 2005 you can replace the part :Quote[/b] ]_u CreateUnit [getpos _trig, _zombiegroup] With: Quote[/b] ]_u CreateUnit [getpos _trig, _zombiegroup,"This join grpnull"] Or if that done work Quote[/b] ]_u CreateUnit [getpos _trig, _zombiegroup,"zombiedude1=this;zombiedude join grpnull"] <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_A = 0 _trig=_this select 0 _zombiegroup=_this select 1 #HardAttack _A=_A+1 _zombiesIwannaspawn = ["zombieex1", "zombieex2", "zombieex3", "zombieex4", "zombieex5", "zombieex6", "Zombieexwoman1", "zombieexwoman4", "zombieexwoman3", "zombieex7", "Zombieex8", "Zombieex9"] _y = 0 #loop ? _y >= count _zombiesIwannaspawn: exit _u = _zombiesIwannaspawn select _y _u CreateUnit [getpos _trig, _zombiegroup,"zombiedude1=this"] ~1 [zombiedude1] join grpnull _y = _y + 1 goto "loop" did the trick Share this post Link to post Share on other sites
POPKA 0 Posted July 6, 2005 why is this, when i try and get this to work it comes up with this error message: _u CreateUnit [getpos _trig, _zombiegroup,"zombiedude1=this"]# Error 0 elements provided 3 expected when i create a trigger, then i walk in it and it comes up with that crap? Share this post Link to post Share on other sites
NeMeSiS 11 Posted July 6, 2005 why is this, when i try and get this to work it comes up with this error message:_u CreateUnit [getpos _trig, _zombiegroup,"zombiedude1=this"]# Error 0 elements provided 3 expected when  i create a trigger, then i walk in it and it comes up with that crap? you need to name the trigger, and have a zombiegroup Share this post Link to post Share on other sites
POPKA 0 Posted July 7, 2005 what do you mean have a zombie group, do you mean create a group of zombies and then do ZomGrp1 = group this ? what would be the most useful would be if someone could make an example mission of this Share this post Link to post Share on other sites
NeMeSiS 11 Posted July 8, 2005 what do you mean have a zombie group, do you mean create a group of zombies and then do ZomGrp1 = group this ?what would be the most useful would be if someone could make an example mission of this Quote[/b] ]Zombiegroupname = The name of a unit on the map, id recomend that you place a unit thats the enemy to what ever side the player is on. Place the unit on a far off island and name him Zombiegroup1 or what ever you want. thats what D.murphy man said cant make a example right now Share this post Link to post Share on other sites
Preston 0 Posted November 23, 2005 Sorry to bring back the old topic, but I thought it was better than starting a new one. I need some serious help with zombie spawns, because I follow everything to the letter it seems, place the trigger, etc, etc. I walk into it to activate it, and I get this wierd text at the top of the screen saying something along the lines of: '...Type Group, Expected Object', and nothing happens.. please help! I have tried everything I could think of. Share this post Link to post Share on other sites
Preston 0 Posted November 27, 2005 How long does it take to arnswer my question? I've been waiting days. BUMP. I need help with this, and my problem is not going to go away by itself. Share this post Link to post Share on other sites
LoTekK 0 Posted November 27, 2005 The exact error message would help debug the issue. From the parameters expected by createUnit, it sounds like the error might be "type Object, expected Group" and not the other way round. In which case it sounds like the second parameter you've fed the command is a name that is already in use by another unit (as opposed to group). Quote[/b] ]How long does it take to arnswer my question? I've been waiting days. BUMP. I need help with this, and my problem is not going to go away by itself. By the way, you're not exactly endearing yourself with that attitude. People actually have lives outside of the forums, and are certainly not at your beck and call. It would do you well to realize that receiving help is a privelege, and not an entitlement. I'da ignored your request entirely if not for the fact that I seem to be in an unusually good mood today. Think about that for a bit. Share this post Link to post Share on other sites
NeMeSiS 11 Posted November 27, 2005 It does work, reread everything because you did something wrong, sorry, too tired, dont expect more help from me  EDIT: ow someone posted before me Share this post Link to post Share on other sites
Trapper 0 Posted November 27, 2005 This will spawn 12 zombies a given locationQuote[/b] ]..._trig=_this select 0 _zombiegroup=_this select 1 ... ...place in the on activation field [Zombiegroupname,Triggername] exec "scriptname.sqs"... You're not providing much information Preston, but when you said you did everything exactly like written above... try [Triggername,Zombiegroupname] exec "scriptname.sqs" and it should work. Share this post Link to post Share on other sites
Preston 0 Posted November 27, 2005 EDIT: Well damn me.. I got the two commands inside the [] in the trigger activation field the wrong way round.. no idea why I did that. Seems I checked everything else expect that. Well, thanks very much for the help.. I can make zombie maps now w00t. Share this post Link to post Share on other sites