Aller au contenu

Poser des blocs autour d'un joueur


Messages recommandés

Posté(e)

Voilà:

command /sorts:
   trigger:
       if target is a player:
           wait 5 ticks
           set {_x-} to location of target player
           set {_x+} to location of target player
           set {_z-} to location of target player
           set {_z+} to location of target player
           remove 1 from x-coordinate of {_x-}
           add 1 to x-coordinate of {_x+}
           remove 1 from z-coordinate of {_z-}
           add 1 to z-coordinate of {_z+}
           add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}
           if block at {_x-} is air:
               set block at {_x-} to cobweb
           if block at {_x+} is air:
               set block at {_x+} to cobweb
           if block at {_z-} is air:
               set block at {_z-} to cobweb
           if block at {_z+} is air:
               set block at {_z+} to cobweb
           add 1 to y-coordinate of {_x-}
           add 1 to y-coordinate of {_x+}
           add 1 to y-coordinate of {_z-}
           add 1 to y-coordinate of {_z+}
           if block at {_x-} is air:
               set block at {_x-} to cobweb
           if block at {_x+} is air:
               set block at {_x+} to cobweb
           if block at {_z-} is air:
               set block at {_z-} to cobweb
           if block at {_z+} is air:
               set block at {_z+} to cobweb
           add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}
           wait 10 seconds
           loop {_list::*}:
               set block at loop-value to air

  • J'aime 1
Posté(e)

Même problème :/ Les blocs du bas ne s’enlèvent pas ^^

 

            add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}

Et

            add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}

 

Même variable donc le dernier en date doit annuler l'autre non ?

Posté(e)

Humm je vient de trouver une nouvelle fonction ^^

command /sorts:
   trigger:
       if target is a player:
           wait 5 ticks
           set {_x-} to location of target player
           set {_x+} to location of target player
           set {_z-} to location of target player
           set {_z+} to location of target player
           remove 1 from x-coordinate of {_x-}
           add 1 to x-coordinate of {_x+}
           remove 1 from z-coordinate of {_z-}
           add 1 to z-coordinate of {_z+}
           add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}
           if block at {_x-} is air:
               set block at {_x-} to cobweb
           if block at {_x+} is air:
               set block at {_x+} to cobweb
           if block at {_z-} is air:
               set block at {_z-} to cobweb
           if block at {_z+} is air:
               set block at {_z+} to cobweb
           add 1 to y-coordinate of {_x-}
           add 1 to y-coordinate of {_x+}
           add 1 to y-coordinate of {_z-}
           add 1 to y-coordinate of {_z+}
           if block at {_x-} is air:
               set block at {_x-} to cobweb
           if block at {_x+} is air:
               set block at {_x+} to cobweb
           if block at {_z-} is air:
               set block at {_z-} to cobweb
           if block at {_z+} is air:
               set block at {_z+} to cobweb
           add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}
           wait 10 seconds
           loop {_list::*}:
               set block at loop-value to air
           remove 1 from y-coordinate of {_x-}
           remove 1 from y-coordinate of {_x+}
           remove 1 from y-coordinate of {_z-}
           remove 1 from y-coordinate of {_z+}
           loop {_list::*}:
               set block at loop-value to air

  • J'aime 1
Posté(e)

Ça fonctionne ! Merci beaucoup, dernière chose, est-ce possible de rajouter un bloc au dessus de la tête du joueur comme je l'avais fait avec ce code :

set block 3 meter above {_is.coordonne} to cobweb block

En sachant {_is.coordonne} = position du joueur

Et qu'il s’enlève en même temps que les autres

Posté(e)
command /sorts:
   trigger:
       if target is a player:
           wait 5 ticks
           set {_y} to location of target player
           set {_x-} to location of target player
           set {_x+} to location of target player
           set {_z-} to location of target player
           set {_z+} to location of target player
           remove 1 from x-coordinate of {_x-}
           add 1 to x-coordinate of {_x+}
           remove 1 from z-coordinate of {_z-}
           add 1 to z-coordinate of {_z+}
           add 2 to y-coordinate of {_y}
           add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}
           add {_y} to {_list::*}
           if block at {_x-} is air:
               set block at {_x-} to cobweb
           if block at {_x+} is air:
               set block at {_x+} to cobweb
           if block at {_z-} is air:
               set block at {_z-} to cobweb
           if block at {_z+} is air:
               set block at {_z+} to cobweb
           if block at {_y} is air:
               set block at {_y} to cobweb
           add 1 to y-coordinate of {_x-}
           add 1 to y-coordinate of {_x+}
           add 1 to y-coordinate of {_z-}
           add 1 to y-coordinate of {_z+}
           if block at {_x-} is air:
               set block at {_x-} to cobweb
           if block at {_x+} is air:
               set block at {_x+} to cobweb
           if block at {_z-} is air:
               set block at {_z-} to cobweb
           if block at {_z+} is air:
               set block at {_z+} to cobweb
           add {_x-} to {_list::*}
           add {_x+} to {_list::*}
           add {_z-} to {_list::*}
           add {_z+} to {_list::*}
           wait 10 seconds
           loop {_list::*}:
               set block at loop-value to air
           remove 1 from y-coordinate of {_x-}
           remove 1 from y-coordinate of {_x+}
           remove 1 from y-coordinate of {_z-}
           remove 1 from y-coordinate of {_z+}
           loop {_list::*}:
               set block at loop-value to air

  • J'aime 1
×
×
  • 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.