AttePatte Posted June 9, 2023 Share Posted June 9, 2023 on load: loop all players: loop all zombies in world of loop-player: add loop-zombie to {_zombies::*} add loop-player to {_players::*} every 5 seconds: loop {_players::*}: set {_player} to loop-player loop {_zombies::*}: set {_zombie} to loop-zombie if {_zombies::*} is empty: continue if {_player} is not online: remove {_player} from {_players::*} remove {_zombie} from {_zombies::*} continue set {_path} to walkable path from location of {_zombie} to location of {_player} if {_path} is not set: continue set {_current} to first entry of {_path} remove loop-value-1 from {_path} while {_path} is not empty: teleport {_zombie} to {_current} set {_current} to first entry of {_path} remove loop-value-1 from {_path} wait 1 tick on quit: set {_exited} to event-player remove {_exited} from {_players::*} loop {_zombies::*}: if loop-zombie is in world of event-player: remove loop-zombie from {_zombies::*} on join: add event-player to {_players::*} loop all zombies in world of event-player: add loop-value to {_zombies::*} It's possible that the Skript syntax or plugin version is different from what I'm familiar with. 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