Jump to content

This code only works for one player? (I can damage players with this abilty but cant damage me)


nampers

Recommended Posts

code:

 

 

on rightclick holding sword:
    if name of player's tool is "&c&lRoyal &7&lScepter":
        play mob spawner flames at position of player to the player
        set {makedamage} to true
        wait 10 second
        set {makedamage} to false
every 3 ticks:
    loop all players:
        if {makedamage} is true:
            damage all players in radius 300 of loop-player where [input is not loop-player] by 2

Link to comment
Share on other sites

u forgot to set {makedamage::%player%} instead of a global variable, so it just works for everyone!

on right click with sword:

    if name of player's tool is "&c&lRoyal &7&lScepter":
        play mob spawner flames at position of player to the player
        set {makedamage::%player%} to true
        wait 10 second
        set {makedamage::%player%} to false
every 3 ticks:
    loop all players:
        if {makedamage} is true:
            damage all players in radius 300 of loop-player by 2 hearts

Edited by HugeAdventure
Minecraft Developer 4+ years
 
Discord: HugeAdventure

image.gif.6ea2bf97b6307b1093517252fd317d10.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...