Trouble making a fireball deal 0 damage to player but 15 damage to other mobs

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

Cynacol

New Member
Jul 14, 2022
6
0
1
23
As the title says, I am trying to make it so that a fireball will deal 0 damage or hearts to players, but 15 hearts to other mobs. I have no addons installed and here is the code for the on damage event
Code:
on damage:
    event-projectile is set:
        event-projectile is a lightning:
            attacker's tool is enchanted book named "&6&lFireball Spellbook":
                victim is a player
                cancel event
                victim is not a player
                damage the victim by 15 hearts
:
 
maybe?
Code:
on damage:
    if projectile is set:
        if projectile is a fireball:
            if name of attacker's tool is "&6&lFireball Spellbook":
                if victim is a player:
                    cancel event
                else:
                    set damage to 15
for me its working :emoji_slight_smile: if not working please send the output of your /skript info
 
Code:
if victim is a player:
    cancel event
if victim is not a player:
    damage the victim by 15 hearts
Try this
 
don't use
Code:
damage the victim by 15 hearts
if you doing a game that give the player kills etc... because this damage is not a player damage but you can use both
Code:
set damage to 15
and
Code:
make player damage victim by 15 hearts
 
Status
Not open for further replies.