Hello!
I am currently creating a game in which players right click a sponge in order to start "capturing" a "town". When they right click a sponge, how can I check for a player in a radius of 7 around the block every 0.5 seconds? If the player leaves the seven block radius, the capture stops.
I assume I need to use "loop-blocks in radius 7" but I am not sure exactly how to apply it to this situation. Here is what I have so far, although it probably won't be very helpful:
Don't worry about the variables, I have those covered Thanks for any help!
I am currently creating a game in which players right click a sponge in order to start "capturing" a "town". When they right click a sponge, how can I check for a player in a radius of 7 around the block every 0.5 seconds? If the player leaves the seven block radius, the capture stops.
I assume I need to use "loop-blocks in radius 7" but I am not sure exactly how to apply it to this situation. Here is what I have so far, although it probably won't be very helpful:
Code:
on click on sponge:
if block under is white concrete:
if {joined.%player%} is true:
if {segestica_owner} is set:
if {segestica_process} is false:
if {segestica_cooldown} is false:
if {team.%player%} is "Santiago":
if {segestica_owner} is "Santiago":
send "{@Prefix} Your nation already owns Segestica!" to player
else:
broadcast "{@Prefix} &eSantiago &ais capturing <%{segestica_color}%>Segestica &afrom <%{segestica_color}%>%{segestica_owner}% &7(&a3 minutes&7)&a."
wait 1 minute
broadcast "{@Prefix} &eSantiago &ais capturing <%{segestica_color}%>Segestica &afrom <%{segestica_color}%>%{segestica_owner}% &7(&e2 minutes&7)&a."
wait 1 minute
broadcast "{@Prefix} &eSantiago &ais capturing <%{segestica_color}%>Segestica &afrom <%{segestica_color}%>%{segestica_owner}% &7(&1 minute&7)&a."
wait 30 seconds
broadcast "{@Prefix} &eSantiago &ais capturing <%{segestica_color}%>Segestica &afrom <%{segestica_color}%>%{segestica_owner}% &7(&430 seconds&7)&a."
wait 15 seconds
broadcast "{@Prefix} &eSantiago &ais capturing <%{segestica_color}%>Segestica &afrom <%{segestica_color}%>%{segestica_owner}% &7(&415 seconds&7)&a."
wait 15 seconds
broadcast "{@Prefix} &eSantiago &ahas captured &eSegestica &afrom <%{segestica_color}%>%{segestica_owner}%&a."
wait 1 tick
set {segestica_color} to yellow
set {segestica_owner} to "Santiago"
Don't worry about the variables, I have those covered Thanks for any help!