• 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.

irondude_game

Member
Nov 7, 2019
3
0
0
26
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!")
 
Try this, works for me!

Code:
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
 
"
'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_language.skript:
event:
    condition:
        effect
 
Status
Not open for further replies.