I am programming a plugin in Skript using SkRayFall (though I'm unsure that that's useful for this scenario, I should put it there anyway) and I have a program that's supposed to damage all entities in a 1 block radius while pushing the play forward. This works fine, although it damages the player, which I do not want. It produces no errors.
Code:
Is there a way I could do this? This should work, and I think it's something to do with the loop-entity-2 part, but I am unable to fix it.
UPDATE:
Fixed by changing the loop code to
Not sure what part is redundant here, but something is. Thanks for the help!
Code:
Code:
on right click:
player is holding a goat horn named "§7Robotic Horn":
#broadcast "test"
if {globalcooldown.%player%} is 0:
if {mana.%player%} > 14:
remove 15 from {mana.%player%}
set {globalcooldown.%player%} to 5
push player forward at speed 3
set {ram.%player%} to true
wait 0.5 seconds
set {ram.%player%} to false
else:
send "&cPlease wait %{globalcooldown.%player%}% seconds to use this again!" to player
Code:
every 1 tick:
loop all players:
if {ram.%loop-player%} is true:
loop all entities in radius 1 around loop-player:
if loop-entity-2 is not a player or villager or armor stand:
damage loop-entity-2 by 5
Is there a way I could do this? This should work, and I think it's something to do with the loop-entity-2 part, but I am unable to fix it.
UPDATE:
Fixed by changing the loop code to
Code:
every 1 tick:
loop all players:
if {ram::%loop-player%} is true:
loop all entities in radius 1 around loop-player where [entity is not player]:
if loop-entity-2 is not a player:
damage loop-entity-2 by 5
Last edited: