Solved Not hurting certain players

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

JackyBoy

Member
Feb 4, 2017
104
1
18
21
Hi there, I'm working on this new system where you can throw a snowball and when it falls it creates an explosion. Is there a way to make it that if a player is a certain variable it wont hurt them?

code_language.skript:
on projectile hit:
  projectile is a snowball
  create safe explosion of force 3 at location
 
Use the on damage event with the damage cause condition.
Thanks, I'm still not 100% sure how this would work though
[doublepost=1546599070,1546598610][/doublepost]I have this but I need it so that if the player who shot the snowball is also in the same team it won't hurt them
code_language.skript:
on damage:
  if damage cause is block explosion:
    if {%victim%.team} is 1:
      cancel event
      broadcast "True"
 
code_language.skript:
on damage:
    if projectile is a snowball:
        if {%victim%.team} is {%attacker%.team}:
            cancel event
        else:
            #explosion?
 
Status
Not open for further replies.