Drakorle Posté(e) le 19 août 2015 Posté(e) le 19 août 2015 Bonjour, Je cherche à créer un skript qui permettrait de laisser passer les flèches, et autres projectiles, à travers les blocs invisibles, de sorte qu'ils continuent normalement jusqu'à atteindre un bloc solide. J'ai déjà fait quelques tests avec de la terre: on projectile hit: wait 1 tick set {_block} to the block at location 0.1 in front of the projectile if {_block} is air: set {_block} to the block at location 0.1 behind the projectile set {_location} to location of {_block} broadcast "Block type: %{_block}%" broadcast "Coords: %{_location}%" if {_block} is dirt: set block at {_location} to air wait 20 ticks set block at {_location} to dirt Seulement, il faut atteindre 1 tick pour que la flèche soit bien posé, et si on atteint un tick, elle perd sa vitesse... J'ai pensé à la relancer à chaque fois, mais je doute que ça marcherais... Si quelqu'un trouve une solution, je lui serais reconnaissant. PS: j'oubliais, si possible avec seulement SkQuery, randomSK et Umbaska
Drakorle Posté(e) le 19 août 2015 Auteur Posté(e) le 19 août 2015 Solution trouvée sur des essais sur la dirt: On Shoot: set {_timer} to 0 while 15 is greater than {_timer}: set {_location} to location of the projectile loop blocks in radius 4 of {_location}: broadcast "%loop-block%" if loop-block is dirt: set block at location of loop-block to air Add location of loop-block to {_invisible::*} add 1 to {_timer} wait 0.5 tick loop {_invisible::*}: set block at loop-value to dirt Gros problème: Lorsque je remplace dirt par 166 or barrier, il ne reconnait pas le bloc, quelqu'un sait à quoi c'est dû ? Ps: Si quelqu'un avait une solution pour savoir quand un projectile atteint le sol, pour remplacer le while 15 is greater than {_timer}:
Messages recommandés