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.

I'm Trying to make the damage depend on placeholder

Discussion in 'Skript' started by Phoom, May 25, 2021.

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

    Phoom New Member

    Joined:
    Oct 27, 2020
    Messages:
    5
    Likes Received:
    0
    on damage:
    attacker's held item's name is "&fPing Sword":
    set {_pingg} to placeholder "player_ping"
    add %{_pingg}% to damage

    I can't do this it shown up as former is not a number how can I set it to number
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Is the placeholder a former integer? If yes try
    Code (Text):
    1. add {_pingg} to final damage
     
  3. nicolas toledo

    Joined:
    Mar 29, 2020
    Messages:
    28
    Likes Received:
    0
    Code (Text):
    1. on damage:
    2.   set {_pingg} to placeholder "player_ping"
    3.   set {_pingg} to damage
    4.   increase damage by {_pingg}
     
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    I don't think this is what he wants

    But I got another idea:
    Code (Text):
    1. on damage:
    2.   if attacker's held item's name is "&fPing Sword":
    3.     set {_ping} to placeholder "player_ping" parsed as a number
    4.     set {_finaldamage} to final damage + {_ping}
    5.     set final damage to {_finaldamage}
     
Thread Status:
Not open for further replies.

Share This Page

Loading...