Solved How to do this

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

zide

Member
Aug 23, 2017
42
1
0
20
How to do this:
When a player right click a wooden stick,make him shot a snowball that can cause 10 damage?
Sorry for my bad english.
My minecraft version is 1.12.2.
 
code_language.skript:
on right click holding stick:
    make player shoot snowball with speed 1
    set metadata value "SpecialSnowball" of shot projectile to true
on damage:
   if victim is a player:
       if "%damage cause%" is "projectile":
           if metadata value "SpecialSnowball" of event-projectile is true:
               set damage to 10
Requires skellett for the metadata part

Edit: Also the damage would only work on other players, you can change that by removing the if victim is player condition
 
code_language.skript:
on right click holding stick:
    make player shoot snowball with speed 1
    set metadata value "SpecialSnowball" of shot projectile to true
on damage:
   if victim is a player:
       if "%damage cause%" is "projectile":
           if metadata value "SpecialSnowball" of event-projectile is true:
               set damage to 10
Requires skellett for the metadata part

Edit: Also the damage would only work on other players, you can change that by removing the if victim is player condition
Thank you very much!!!!!!!!!!!
And if
code_language.skript:
if damage cause is projectile:
don't work in my computer,
will
code_language.skript:
if "%damage cause%" is "projectile":
work?
 
Status
Not open for further replies.