Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: NaviLlicious on May 25, 2014, 10:50:00 pm
Title: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 25, 2014, 10:50:00 pm
Was wondering how I would make the zombies respawn when a player walks to far away from the zombies like on Mob of the Dead, I have an elevator and a teleporter setup but when the player uses one of them It puts them In an area the zombies can't get to unless they respawn
Title: Re: Make zombies respawn when player walks to far away?
Post by: daedra descent on May 25, 2014, 10:53:28 pm
Get the axis(zombie) array and do the function dodamage(); on them.
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 25, 2014, 11:04:58 pm
Was wondering how I would make the zombies respawn when a player walks to far away from the zombies like on Mob of the Dead, I have an elevator and a teleporter setup but when the player uses one of them It puts them In an area the zombies can't get to unless they respawn
The way I went about this with zombie train is: What this does is kill of any remaining zombies. I used a trigger mult... It will end the round and start the next one.
Hope this helps! :P
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 26, 2014, 03:56:28 am
The way I went about this with zombie train is: What this does is kill of any remaining zombies. I used a trigger mult... It will end the round and start the next one.
Hope this helps! :P
Thanks, you said you used a trigger mult for It? I tried putting a trig multiple In and It keeps the zombies from spawning until It's activated this Is how I put It In
Title: Re: Make zombies respawn when player walks to far away?
Post by: DuaLVII on May 26, 2014, 07:58:11 am
Untested Template
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 27, 2014, 10:08:46 pm
Sorry for the late reply, tried this script but when I get really far from the zombies they don't die/respawn
Title: Re: Make zombies respawn when player walks to far away?
Post by: DuaLVII on May 27, 2014, 10:32:33 pm
Did you create a new gsc for this and execute it correctly (may need to adjust max distance variable a little lower)
Title: Re: Make zombies respawn when player walks to far away?
Post by: jjbradman on May 27, 2014, 10:34:07 pm
because it gets an array of the zombies of zombies once. that means i gets a list of 1 zombies at game start. then a new zombie spawn outside that array. so code wont affect it Post Merge: May 27, 2014, 10:36:35 pmthis will work using your code but i would do this stuff using zombiemodespawner. no need of getting arrays.
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 27, 2014, 10:36:48 pm
because it gets an array of the zombies of zombies once. that means i gets a list of 1 zombies at game start. then a new zombie spawn outside that array. so code wont affect it Post Merge: May 27, 2014, 10:36:35 pmthis will work using your code but i would do this stuff using zombiemodespawner. no need of getting arrays.
I will also try this thanks guys
Title: Re: Make zombies respawn when player walks to far away?
Post by: DuaLVII on May 27, 2014, 10:39:11 pm
Thats the thing you'd run zombie_check through a loop.
However I came up with a better idea which envoles the second function but as a defined function to an ai through round spawning in zombiemode gsc.
The previous script was just a quick knock up untested idea.
I'll post my new idea up in script form tomorrow. bit late for me right now, so I'll edit this part out.
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 27, 2014, 10:46:01 pm
ok i modified my topic whi the code. it just needs to get your spawner to trigger the closer one to the player
The zombies die and the round doesn't end but the zombies also don't respawn even when standing In a zone how would I make the spawners trigger when a player gets close to them?
Title: Re: Make zombies respawn when player walks to far away?
Post by: jjbradman on May 28, 2014, 05:27:03 am
if you look in the script theres a part in which i mentioned you somehow have to acquiare the spawners and then check distance :l emm can you show me your spawners kvps? Post Merge: May 28, 2014, 05:44:25 amlol i should make a tut on how to do this after it gets finished xD
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 28, 2014, 09:46:03 am
The KVP's are the normal zombie KVP's here are the targetnames for them "targetname" "initial_zone_spawner" "targetname" "zone1_spawner" "targetname" "zone2_spawner" the number goes up from there
Title: Re: Make zombies respawn when player walks to far away?
Post by: DuaLVII on May 28, 2014, 09:57:01 am
Here's my progress on my version of the respawn which I've coded into the round_spawning under zombiemode think with additional functions to making this work.
For testing I set the distance to 1000 and so far there seems to be no glitches in the process however I did this without playable_area also so I need to also make sure zombie deaths by distance don't spawn powerups.
Here's my progress on my version of the respawn which I've coded into the round_spawning under zombiemode think with additional functions to making this work.
For testing I set the distance to 1000 and so far there seems to be no glitches in the process however I did this without playable_area also so I need to also make sure zombie deaths by distance don't spawn powerups.
Not that there were no nodes there was just no exterior goal for them to go to, but it works.
Gotcha
Title: Re: Make zombies respawn when player walks to far away?
Post by: DuaLVII on May 29, 2014, 09:38:04 am
Update, All issues I was having before are fixed and powerups don't spawn on zombie deaths from distance. Just going to do a hard test on it before sending it out.
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on May 29, 2014, 10:19:42 am
Very nice can't wait I appreciate It dude
Title: Re: Make zombies respawn when player walks to far away?
Post by: DuaLVII on June 01, 2014, 08:49:50 am
I've done a hard test on this script with zombie spawn delays of 0.1 and wait between rounds as 5 seconds and all worked really well.
I've harshly modified the round_spawning feature which delayed me putting this out for a little while because if round_spawning was to bug out in higher waves it could go terribly wrong so it shouldn't do this.
I won't put this up as a tutorial for now until it's properly tested so consider it as a beta.
Open up _zombiemode.gsc and search for `level.overridePlayerDamage = ::player_damage_override;` around line 103. Below add the following; Next find `round_spawning()` around line 1435. Replace the whole round_spawning() function with this;
Below the end of the round_spawning function, Add these 4 functions in;
Save the _zombiemode.gsc and then open up your _zombiemode_spawner.gsc Search for `zombie_can_drop_powerups( zombie )` and replace the function with this;
Title: Re: Make zombies respawn when player walks to far away?
Post by: NaviLlicious on June 01, 2014, 02:22:02 pm