i'm making a gamemode where the world border moves with the pig. Yeah, that's it.
Here is the skript:
function spawnmob(loc: location, entity: entity type):
spawn {_entity} at {_loc}
on death:
if victim is pig:
if victim's name is "World Border":
cancel event
command /pig:
trigger:
spawnmob(location of player, pig)
set name of last spawned entity to "World Border"
set {_entity} to last spawned entity
every 0.1 seconds in world "world":
set {_x} to x-position of {_ent