hello!
im need to do something like paintball gun
Firing:
Hitting:
but im need it to get back replaced blocks after 3 seconds...
how to save every block, than set it into random colored clay and than after 3 seconds replace clay with saved block...
plzz help
[doublepost=1515948650,1515946670][/doublepost]I made it like this:
but the block variable was changed when "set the loop-block to {_paintblock} parsed as item" is run
idk what is this.. its unreal.. WTF? there is no command to change variable.. it shuldnt do that.. its insane!
sorry for my english but.. wtf??
plzzzz help me!
im need to do something like paintball gun
Firing:
code_language.skript:
on click:
if player's tool is a gold horse armor:
spawn ender pearl at position 1 above and 1.5 in front of the player
push last spawned ender pearl in direction of player with force 2
play sound "entity.chicken.egg" with volume 10 and pitch 2 at player for players in radius 5 of player
Hitting:
code_language.skript:
on projectile hit:
if projectile is ender pearl:
play sound "block.metal.break" with volume 10 and pitch 2 at projectile for players in radius 8 of projectile
loop blocks in radius 2 of projectile:
if loop-block is not air:
set {_pblock} to a random integer between 1 and 8
set {_paintblock} to "159:%{_pblock}%"
set the loop-block to {_paintblock} parsed as item
how to save every block, than set it into random colored clay and than after 3 seconds replace clay with saved block...
plzz help
[doublepost=1515948650,1515946670][/doublepost]I made it like this:
code_language.skript:
on projectile hit:
if projectile is ender pearl:
play sound "block.metal.break" with volume 10 and pitch 2 at projectile for players in radius 8 of projectile
loop blocks in radius 2 of projectile:
if loop-block is not air:
set {_paintball::%location of loop-block%} to loop-block
broadcast "1: %location of loop-block% | %{_paintball::%location of loop-block%}%"
wait 1 seconds
set {_pblock} to a random integer between 1 and 8
set {_paintblock} to "159:%{_pblock}%"
set the loop-block to {_paintblock} parsed as item
broadcast "2: %location of loop-block% | %{_paintball::%location of loop-block%}%"
broadcast "fffff"
wait 3 seconds
broadcast "------------------"
loop blocks in radius 2 of projectile:
if loop-block is not air:
broadcast "%location of loop-block% | %{_paintball::%location of loop-block%}%"
set loop-block to {_paintball::%location of loop-block%}
idk what is this.. its unreal.. WTF? there is no command to change variable.. it shuldnt do that.. its insane!
sorry for my english but.. wtf??
plzzzz help me!
Last edited: