Aller au contenu
  • 0

push the brick in the direction....


Question

Posté(e)

SKRIPT: 2.2 dev 25

MC: 1.8.8

 

Bonjour/Bonsoir,

 

J'ai essayer de faire ceci :

 

on rightclick with brick:
   set {_coord} to location of player
   add 1 to y-coordinate of {_coord} 
   remove brick named "&6Dynamite" from player's inventory
   drop brick named "&6Dynamite" at {_coord}
   wait 1 ticks
   push the brick in the direction of the player at speed 0.3[code]mais sa ne marche pas j'ai essayer de loop les item autour du joueur mais s'il drop un de brick puis click avec la "Dynamite" les 2 se stack. Comment faire pour loop uniquement l'item dropper ?

Merci

8 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Les items drop devienne des entité, chaque entité a sont propre UUID.

 

donc tu detecte l'uuid qui a ete cliqué.

Pour le stackage je sais pas si il est possible de l'evité , voie du coté des nbt tag

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

Pas testé

on rightclick with brick:
   set {_coord} to location of player
   add 1 to y-coordinate of {_coord}
   remove brick named "&6Dynamite" from player's inventory
   drop brick named "&6Dynamite &0DROPED" at {_coord}
   loop all entity in a radius of 2 around the player:
       if loop-entity is a item:
           if name of loop-entity is "&6Dynamite &0DROPED":
               #.....
   wait 1 ticks

  • 0
Posté(e)

Le nom de l'entitée est "dropped item"

 

sinon

the spawned-entity ?

Ne marche pas

 

J'ai également essayer

on rightclick with brick:
   set {_coord} to location of player
   add 1 to y-coordinate of {_coord}
   remove brick named "&6Dynamite" from player's inventory
   drop brick named "&6Dynamite" at {_coord}
   loop all entity in a radius of 2 around the player:
       if loop-entity is a item:
           if name of loop-entity is "&6Dynamite":
               push the loop-entity in the direction of the player at speed 0.3
           wait 4 seconds
           create an explosion of force 2 at loop-entity   
       send "%name of loop-entity%"   
   wait 1 ticks

Mais sa me dit <none> et LeCraftDeOuf

  • 0
Posté(e)
on rightclick with brick:
   set {_coord} to location of player
   add 1 to y-coordinate of {_coord}
   remove brick named "&6Dynamite" from player's inventory
   drop brick named "&6Dynamite" at {_coord}
   loop all entity in a radius of 2 around the player:
       if loop-entity is a item:
           if name of loop-entity is "&6Dynamite":
               push the loop-entity in the direction of the player at speed 0.3
               send "%name of loop-entity%" 
               wait 4 seconds
               create an explosion of force 2 at loop-entity 
   wait 1 ticks

×
×
  • 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.