Hi, I'm trying to make a calculation so that when the arrow reaches the center point of the block it receives 3 points, farther from the center 2 points and farthest from the center of the block 1 point.
This is my actual code:
When test it i don t get any "test" message:
Can someone help me with?
This is my actual code:
Code:
on projectile hit:
if {shape::*} is true:
if {game::*} is true:
projectile is arrow:
shooter is player:
if event.getHitBlock() is target:
set {_x::*} to x-location of projectile
set {_y::*} to y-location of projectile
set {_z::*} to z-location of projectile
set {_xar1} to "%event-block's x-location%"
set {_yar1} to "%event-block's y-location%"
set {_zar1} to "%event-block's z-location%"
message "Hit coords %{_x::*}% %{_xar1}% %{_y::*}% %{_yar1}% %{_z::*}% %{_zar1}%" to shooter
message "&e+1 point" to shooter
if {_x::*} > {_xar1}+0.5:
message "test"
else:
cancel event
When test it i don t get any "test" message:
Can someone help me with?