1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Doesn't damage players

Discussion in 'Skript' started by KingDooms, Sep 8, 2021.

Thread Status:
Not open for further replies.
  1. KingDooms

    KingDooms Member

    Joined:
    Jun 10, 2020
    Messages:
    22
    Likes Received:
    0
    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 (Text):
    1.         if {ShaggyWeapon::%player%} is 3:
    2.             push the player up at speed 1.1
    3.             wait 16 ticks
    4.             set {_ShaggyWhat2} to location of player
    5.             loop 5 times:
    6.                 teleport player to {_ShaggyWhat2}
    7.                 wait 1 tick
    8.                 drawDot count 20, particle endrod, speed 0.1, center location of player, rainbowMode false, visibleRange 50, pulseDelay 0, keepFor 2 tick
    9.                 loop all entities in radius 15 of the player:
    10.                     if loop-entity is not the player:
    11.                         make the player damage loop-entity by 50
    12.                 wait 1 tick
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    try removing this line "if loop-entity is not the player:"
    if this causes the error, change it to:
    Code (Text):
    1. if "%loop-entity%" is not "%player%":
    or
    Code (Text):
    1. if "%name of loop-entity%" is not "%player%":
     
  3. KingDooms

    KingDooms Member

    Joined:
    Jun 10, 2020
    Messages:
    22
    Likes Received:
    0
    Didn't work :/
     
  4. ShyDoge

    ShyDoge Member

    Joined:
    Jul 31, 2021
    Messages:
    41
    Likes Received:
    1
    Code (Text):
    1. set {call1.%player%} to true
    2. on damage:
    3.   if {call1.%victim%} is true:
    4.     cancel event
    Add this to the end of your code. It won't stop the damage but it will cancel it when it happens
     
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    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.
     
  6. ShyDoge

    ShyDoge Member

    Joined:
    Jul 31, 2021
    Messages:
    41
    Likes Received:
    1
    I agree, however I was just giving him / her alternate solutions.
     
  7. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    The scripts looks like it should work, are you sure you have players around you? Try to broadcast loop-entity
     
Thread Status:
Not open for further replies.

Share This Page

Loading...