SnowBall Effects

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

FactionsCrazy

New Member
Sep 1, 2019
8
0
0
20
I was Wondering If Their was a way to add it so a Special Snowball (Not just all snowballs) was to hit a player that player would get a Potion effect.
I currently Don't have the code I was looking at like onDamage and onProjectileHit but I couldn't figure it out.
 
You actually can. By using "On Damage" condition and using "event-projectile" to check the projectile type.
Here's an example. But I haven't test it yet :emoji_sweat_smile:
Code:
on damage:
    if event-projectile is a snowball:
        apply slowness 1 to victim for 3 seconds
 
Ok but Is their away to make it so its only a certain type of snowball??

You can apply information (ex. a variable) to the thrower or the projectile itself to differentiate the type of the snowball you throw.

Here's an example:
Code:
on shoot:
    if name of shooter's held item is "A very cold snowball": #<----- check's the name of the shooter's held item
        set {snowball.%shooter%} to true

on damage:
    if event-projectile is a snowball:
        if {snowball.%attacker%} is set:
            apply slowness 1 to victim for 3 seconds
            delete {snowball.%attacker%}

There's probably a better way to do it. But this one is just an example. Hope it helps :emoji_v:
 
Status
Not open for further replies.