When i reload my skript on my server, everything checks out and i do not know why it isn't working. here is the skript
It is supposed to document the player shooting the target blocks, once all four are shot, the fourth one opens a door by removing blocks, then 30 seconds later putting them back.
on projectile hit:
if event-projectile is arrow:
if type of event-block is target:
set {_loc1} to location -5532, 39, -1994
set {_loc2} to location -5525, 37, -1993
set {_loc3} to location -5531, 41, -2002
set {_loc4} to location -5521, 42, -2001
if event-block's location is {_loc1}:
set {hit_target_1::%shooter%} to true
if event-block's location is {_loc2}:
set {hit_target_2::%shooter%} to true
if event-block's location is {_loc3}:
set {hit_target_3::%shooter%} to true
if event-block's location is {_loc4}:
set {hit_target_4::%shooter%} to true
else if:
stop
if {hit_target_1::%shooter%} is true:
if {hit_target_2::%shooter%} is true:
if {hit_target_3::%shooter%} is true:
if {hit_target_4::%shooter%} is true:
set block at location -5537, 36, -1985 to air
set block at location -5537, 35, -1984 to air
wait 30 seconds
set block at location -5537, 36, -1985 to red_concrete
set block at location -5537, 35, -1984 to red_concrete
set {hit_target_1::%shooter%} to false
set {hit_target_2::%shooter%} to false
set {hit_target_3::%shooter%} to false
set {hit_target_4::%shooter%} to false
i am new to skript so any help would be greatly appreciated. The problems are:
- Any time a block is shot with an arrow, the door opens
- Even if i try to set the hit target things to false, they still immediately open the door on the first try.
This makes me think that 1. It is not recognising that i want the arrow to be shot specifically at a target block and 2. It does not require all four of the blocks to be shot??? please help!
It is supposed to document the player shooting the target blocks, once all four are shot, the fourth one opens a door by removing blocks, then 30 seconds later putting them back.
on projectile hit:
if event-projectile is arrow:
if type of event-block is target:
set {_loc1} to location -5532, 39, -1994
set {_loc2} to location -5525, 37, -1993
set {_loc3} to location -5531, 41, -2002
set {_loc4} to location -5521, 42, -2001
if event-block's location is {_loc1}:
set {hit_target_1::%shooter%} to true
if event-block's location is {_loc2}:
set {hit_target_2::%shooter%} to true
if event-block's location is {_loc3}:
set {hit_target_3::%shooter%} to true
if event-block's location is {_loc4}:
set {hit_target_4::%shooter%} to true
else if:
stop
if {hit_target_1::%shooter%} is true:
if {hit_target_2::%shooter%} is true:
if {hit_target_3::%shooter%} is true:
if {hit_target_4::%shooter%} is true:
set block at location -5537, 36, -1985 to air
set block at location -5537, 35, -1984 to air
wait 30 seconds
set block at location -5537, 36, -1985 to red_concrete
set block at location -5537, 35, -1984 to red_concrete
set {hit_target_1::%shooter%} to false
set {hit_target_2::%shooter%} to false
set {hit_target_3::%shooter%} to false
set {hit_target_4::%shooter%} to false
i am new to skript so any help would be greatly appreciated. The problems are:
- Any time a block is shot with an arrow, the door opens
- Even if i try to set the hit target things to false, they still immediately open the door on the first try.
This makes me think that 1. It is not recognising that i want the arrow to be shot specifically at a target block and 2. It does not require all four of the blocks to be shot??? please help!