Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: mathfag TUTORIAL: How to make zombies stop spawning. You can use this for an easter egg step like in Gorod Krovi, where there are no zombies when Sophia talks
to pause spawning:
to continue spawning:
to kill all of the zombies (1/2):
you can put this in a while(1)
to kill all of the zombies (2/2):
add this to the top of the gsc
note: this will stop all ai including NSZ brutus
ModmeBot:
Reply By: Abnormal202 Useful stuff. I also found you can use:
to stop them from spawning, and use:
to make them start spawning again.
ModmeBot:
Reply By: XxRaPiDK3LLERxX But what if you want the zombies to die when using let's say, a teleporter to teleport far away? Since my map involves a lot of teleportation.
ModmeBot:
Reply By: Abnormal202
XxRaPiDK3LLERxX But what if you want the zombies to die when using let's say, a teleporter to teleport far away? Since my map involves a lot of teleportation.
Find the script for teleporting and inject the line that kills all the zombies right after the teleporter is triggered. Don't know if you want to kill ALL the zombies though.
ModmeBot:
Reply By: Zombeast250 so i am just wanting to clear all the zombies (not kill) and start them spawning again/respawn them again after teleport is complete what lines of code will make this happen?
this is the code:
function player_teleporter_init() { player_tp = GetEntArray( "teleport_player", "targetname" ); for( i = 0; i < player_tp.size; i++ ) { player_tpthread player_teleport(); } } function player_teleport() { destination = GetEnt( self.target, "targetname" ); while(1) { self waittill( "trigger", player );
player SetOrigin( destination.origin ); player SetPlayerAngles( destination.angles );
wait(0.05);
PlaySoundAtPosition( "beast_teleplayer1", player.origin ); // sound made when teleporting //self PlaySound("beast_teleplayer1"); // not working //player PlayLocalSound("beast_teleplayer1"); //works } }
ModmeBot:
Reply By: Abnormal202
Zombeast250 so i am just wanting to clear all the zombies (not kill) and start them spawning again/respawn them again after teleport is complete what lines of code will make this happen? this is the code: function player_teleporter_init(){ player_tp = GetEntArray( "teleport_player", "targetname" ); for( i = 0; i < player_tp.size; i++ ) { player_tpthread player_teleport(); }} function player_teleport(){ destination = GetEnt( self.target, "targetname" ); while(1) { self waittill( "trigger", player ); player SetOrigin( destination.origin ); player SetPlayerAngles( destination.angles ); wait(0.05); PlaySoundAtPosition( "beast_teleplayer1", player.origin ); // sound made when teleporting //self PlaySound("beast_teleplayer1"); // not working //player PlayLocalSound("beast_teleplayer1"); //works }}
what do you mean by clear the zombies (not kill)? You can either kill them, or stop spawning. Now, zombies will respawn if they can't find a path to the player within a certain time, so you could just keep the script how it is and just put spawns where the players teleport to, and they would start respawning there. If you wanted, you could teleport the zombies to there, that would get them there faster. If that's the case put this:
under:
You will have to make a bunch of script_structs in radiant and give them the targetname: "zombie_destination". Put them where zombies can respawn. Make a good amount of them too, like 10.
also can you use the insert code tags next time? it's a lot harder to look at code when it's just pasted into a forum without the code tags.
ModmeBot:
Reply By: Zombeast250 does this look right?
ModmeBot:
Reply By: Abnormal202 tab { and } forward once
ModmeBot:
Reply By: Zombeast250
Abnormal202 tab { and } forward once
not sure what you mean sorry
ModmeBot:
Reply By: Zombeast250 also does the trigger need to be linked (w) to the struct?
ModmeBot:
Reply By: Abnormal202
Zombeast250 also does the trigger need to be linked (w) to the struct?
make this:
this:
and no the trigger doesn't need to target anything else.