Doesn't damage players

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

KingDooms

Member
Jun 10, 2020
26
0
1
So im trying to make a sword that has multiple abilities, but one of the abilities damages everything except players but i want it to damage everything. Help?


Code:
        if {ShaggyWeapon::%player%} is 3:
            push the player up at speed 1.1
            wait 16 ticks
            set {_ShaggyWhat2} to location of player
            loop 5 times:
                teleport player to {_ShaggyWhat2}
                wait 1 tick
                drawDot count 20, particle endrod, speed 0.1, center location of player, rainbowMode false, visibleRange 50, pulseDelay 0, keepFor 2 tick
                loop all entities in radius 15 of the player:
                    if loop-entity is not the player:
                        make the player damage loop-entity by 50
                wait 1 tick
 
try removing this line "if loop-entity is not the player:"
if this causes the error, change it to:
Code:
if "%loop-entity%" is not "%player%":
or
Code:
if "%name of loop-entity%" is not "%player%":
 
Code:
set {call1.%player%} to true
on damage:
  if {call1.%victim%} is true:
    cancel event
Add this to the end of your code. It won't stop the damage but it will cancel it when it happens
 
Code:
set {call1.%player%} to true
on damage:
  if {call1.%victim%} is true:
    cancel event
Add this to the end of your code. It won't stop the damage, but it will cancel it when it happens
Bad solution… And even if we use something like this, we would use LIST variables. We just have to work out why the correct and normal solution is not working. And the best way to do this, is debugging.
 
Bad solution… And even if we use something like this, we would use LIST variables. We just have to work out why the correct and normal solution is not working. And the best way to do this, is debugging.
I agree, however I was just giving him / her alternate solutions.
 
The scripts looks like it should work, are you sure you have players around you? Try to broadcast loop-entity
 
Status
Not open for further replies.