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.

'on damage' doesn't work in commands

Discussion in 'Skript' started by irondude_game, Nov 8, 2019.

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

    irondude_game Member

    Joined:
    Nov 7, 2019
    Messages:
    3
    Likes Received:
    0
    I have this here:

    command /avadakedavra:
    aliases: /ak
    trigger:
    if player is holding a stick:
    message "Avada Kedavra!"
    make player shoot snowball
    on damage:
    projectile exists
    projectile is a snowball
    kill all players within 5 meters of the projectile

    but it returns "can't understand this condition: 'on damage' (line ...)".
    Anybody know how to make this work without taking the on damage out of the function?
    Thanks!

    (Pretend the indents are there, it doesn't allow me to indent. The "on damage:" is aligned with the message "Avada Kedavra!")
     
  2. Vane2k16

    Vane2k16 Member

    Joined:
    Feb 17, 2018
    Messages:
    10
    Likes Received:
    1
    Try this, works for me!

    Code (Text):
    1. command /avadakedavra:
    2.     aliases: /ak
    3.     trigger:
    4.         if player is holding a stick:
    5.             message "Avada Kedavra!"
    6.             make player shoot snowball
    7.  
    8. on damage:
    9.     projectile exists
    10.     projectile is a snowball
    11.     kill all players within 5 meters of the projectile
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    220
    "
    'on damage' doesn't work in commands
    "
    of course they don't, you don't/can't use events within other events/triggers.

    proper Skript format

    Code (Skript):
    1. event:
    2.     condition:
    3.         effect
     
Thread Status:
Not open for further replies.

Share This Page

Loading...