Bonsoir,
Je suis actuellement en version 2.3-alpha4 de skript et sur un serveur spigot 1.12.2. Je créer en Skript qui gère des déplacement de structure et j'aimerai télèporter des cochons par rapport à la position d'un armor stand. Cependant lorsque un joueur monte un cochon, le cochon n'est plus télèporté et lorsque le joueur le quite il se retélèporte normalement . Voici plus en détail el script :
command /ride:
trigger:
set {_r} to 4
set {_loc} to location of player
spawn an armor stand at {_loc}
set {_a} to last spawned entity
add 2 to x-coordinate of {_loc}
spawn a pig at {_loc}
set {_pig} to last spawned entity
set helmet of {_a} to diamond helmet
set gravity of {_a} to false
set gravity of {_pig} to false
equip {_pig} with a saddle
set {_x} to 0
set {_y} to 0
loop 2 times:
set {_phi} to 360
loop 180 times:
set {_x} to 0
set {_y} to 0
set {_loc2} to {_loc}
set {_loc3} to {_loc}
add 2 to x-coordinate of {_loc3}
add {_r} * sin {_phi} to {_x}
add {_r} * cos {_phi} to {_y}
add {_x} to x-coordinate of {_loc2}
add {_y} to y-coordinate of {_loc2}
add {_x} to x-coordinate of {_loc3}
add {_y} to y-coordinate of {_loc3}
add -2 * 3.141592653 / 180 to {_phi}
teleport {_a} to location at {_loc2}
teleport {_pig} to location at {_loc3}
wait 1 tick
Ici le joueur devrait être a deux block de l'armor stand, il est plus de 4...
Merci d'avance pour tous ceux qui pourront m'aider.