Jump to content
  • 0

worldborder following animal skript


Exotic_pink

Question

1 answer to this question

Recommended Posts

  • 0

function spawnmob(loc: location, entity: entity type):
    spawn {_entity} at {_loc}

on death:
    if victim is pig:
        if victim's name is "&b&lWorld Border":
            cancel event

command /pig:
    permission: op
    permission message: No
    trigger:
        spawnmob(location of player, pig)    
        set name of last spawned entity to "&b&lWorld Border"
        set {_entity} to last spawned entity

every 0.1 seconds in world "world":
    set {_x} to x-position of {_entity}
    set {_z} to z-position of {_entity}
    make console execute command "worldborder center {_x} {_z}"

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...