Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [Release] Change zombies Speed v1.0.1

[Release] Change zombies Speed v1.0.1

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
2 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Sorexundefined Offline
    Sorexundefined Offline
    Sorex
    Contributor
    wrote on last edited by Sorex
    #1

    Change Zombies Speed

    Fixed for Plutonium by DoktorSAS

    How to make the code work?

    1. Put the function change_zombies_speed() inside your mod file
    2. Call level thread change_zombies_speed(); in your init function

    Full code

    /* 
        [[---------------------------------------------------------------------------]]
    	Fixed for Plutonium by DoktorSAS
    	Discord: Discord.io/Sorex
    	The code changes the speed of the zombies when they are in the sprinting phase
    	There 4 different speed for zombies with this system.
    	1. walk   		-> Walking Zombies
    	2. sprint 		-> Sprinting Zombies
    	3. run 			-> Running Zombies
    	4. super_sprint -> Fast running zombies
    	[[---------------------------------------------------------------------------]]
    */
    init(){
    	/*
    		[[---------------------------------------------------------------------------]]
    		To make the code work you have to write level thread change_zombies_speed(); 
    		inside your init function
    		[[---------------------------------------------------------------------------]]
    	*/
    	level thread change_zombies_speed(); 
    }
    change_zombies_speed(){
    	level endon("end_game");
    	sprint = "super_sprint"; //Change this variable to change speed
    	can_sprint = false;
     	while(true){
     		can_sprint = false; 
        	zombies = getAiArray(level.zombie_team);
        	foreach(zombie in zombies)
        	if(!isDefined(zombie.cloned_distance))
        		zombie.cloned_distance = zombie.origin;
        	else if(distance(zombie.cloned_distance, zombie.origin) > 15){
        		can_sprint = true;
        		zombie.cloned_distance = zombie.origin;
        		if(zombie.zombie_move_speed == "run" || zombie.zombie_move_speed != sprint)
        			zombie maps/mp/zombies/_zm_utility::set_zombie_run_cycle(sprint);
        	}else if(distance(zombie.cloned_distance, zombie.origin) <= 15){
        		can_sprint = false;
        		zombie.cloned_distance = zombie.origin;
        		zombie maps/mp/zombies/_zm_utility::set_zombie_run_cycle("run");
        	}
        	wait 0.25;
        }
    }
    

    Bug Fixed in v1.0.1:

    • Zombies now can remove the wooden barrier from the window

    Credits for base code to ProjectSynergy

    1 Reply Last reply
    1
    • Dragon115undefined Offline
      Dragon115undefined Offline
      Dragon115
      wrote on last edited by
      #2

      Yo this is sick using this to make tranzit harder thx.

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Donate