Aller au contenu
  • 0

Set la location d'un player to y - 10


Question

Posté(e)

Bonjour, j'ai testé un skript pour changer la location {player.under} à la position du joueur, avec comme coordonnées X du joueur, Y du joueur 10 blocks sous le joueur, Z du joueur

Cependant j'ai beau avoir testé un send "%{player.under}%" dans une autre commande, cette variable affiche toujours <none>.

Merci pour toute aide

 

Voici le skript:

 

command /setpos:
   trigger:
       set {locationofplayerx} to x coordinate of player
       set {locationofplayery} to y coordinate of player
       set {locationofplayerz} to z coordinate of player
       set {locationofplayery} to {%{locationofplayery}% - 10}
       set x coordinate of {player.under} to {locationofplayerx}
       set y coordinate of {player.under} to {locationofplayery}
       set z coordinate of {player.under} to {locationofplayerz}

5 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Erf. J'ai mis ça:

 

command /pos:
   trigger:
       send "X: %x-coordinate of {player.under}%, Y: %y-coordinate of {player.under}%, Z: %z-coordinate of {player.under}%"
       send "%location of {player.under}%"
       send "%{player.under}%"

command /setpos:
   trigger:
       set x-coordinate of {player.under} to x-coordinate of player
       set z-coordinate of {player.under} to z-coordinate of player
       set y-coordinate of {player.under} to y-coordinate of player
       add -10 to y-coordinate of {player.under}

 

Mais ça me met <none> pour chaque /pos, et je connais rien aux coordinates, donc je sais pas où j'ai fait une erreur

  • J'aime 1
  • 0
Posté(e)

Pourquoi fait-tu

  set x-coordinate of {player.under} to x-coordinate of player
       set z-coordinate of {player.under} to z-coordinate of player
       set y-coordinate of {player.under} to y-coordinate of playe

 

Pourquoi pas simplement : set {player.under} to player's location

  • 0
Posté(e)

Comme dit précédemment, je ne connais rien aux coordinates, donc je me suis un peu embrouillé là-dessus ^^

Merci pour tes réponses, je passe en résolu

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.