ATPHHe Posted December 14, 2021 Share Posted December 14, 2021 (edited) Hello, I am currently fixing a mod for Build 41.60+ Multiplayer. The function zombie:changeSpeed(3) does not work anymore as it throws exceptions now. I saw that changedSpeed() does not exist in 41.60+ looking in the Java Decompiler. Will it be added back? function setSpeedCZ(zombie) local zModData = zombie:getModData(); if zModData.done ~= "done" then zombie:changeSpeed(3); zombie:DoZombieStats(); zModData.done = "done"; end end Events.OnZombieUpdate.Add(setSpeed) Edited December 14, 2021 by ATPHHe fixed description Link to comment Share on other sites More sharing options...
Bondzberg Posted December 15, 2021 Share Posted December 15, 2021 (edited) Ran into the same issue updating night sprinters. Found that changeSpeed() was removed and went down several dead ends before I found this janky fix: getSandboxOptions():set("ZombieLore.Speed",1); zombie:makeInactive(true); zombie:makeInactive(false); zombie:DoZombieStats(); As you know, speed is on a zombie to zombie biases. Changing the zombielore does not affect current zombies. However, it does set the default value. The next two lines obviously turn the zombie inactive then back to active(being inactive relates to another zombie lore setting that by default isn't really used). This sets the zombies speedType to -1 which is a flag value saying it needs to be updated. Then when DoZombieStats is executed the zombies the zombies speed will change to the current zombielore setting. Janky as all hell and might not work as well if you want to change individual zombie's speed, but it works I think. Edited December 15, 2021 by Bondzberg ATPHHe 1 Link to comment Share on other sites More sharing options...
ATPHHe Posted December 22, 2021 Author Share Posted December 22, 2021 Ah thanks! That a really nice find. I'll credit you for the this workaround. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now