1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

disable invincibility after being hit

Discussion in 'Skript' started by StunningListen, Mar 25, 2021.

Thread Status:
Not open for further replies.
  1. StunningListen

    Joined:
    Aug 26, 2020
    Messages:
    14
    Likes Received:
    0
    how do you remove the invincibility after you take damage? i'm trying to make a machine gun but the arrows keep bouncing off mobs
     
  2. PatoFrango

    PatoFrango Active Member

    Joined:
    Jul 12, 2017
    Messages:
    240
    Likes Received:
    14
    Could you give us a little more context? Why are the arrows bouncing off? Do you use an Anti Grief plugin, have those entities the Invulnerable:1 tag...?
     
  3. StunningListen

    Joined:
    Aug 26, 2020
    Messages:
    14
    Likes Received:
    0
    they're normal entities, minecraft just has a delay between hits. if you spam hit a player, there's a delay between each time you take damage (and no im not talking about 1.9 combat) if you spam arrows at an entity, some will bounce off, not doing damage.
     
  4. Hykz

    Hykz Member

    Joined:
    May 8, 2017
    Messages:
    28
    Likes Received:
    3
    You can actually remove this using skellett:
    Code (Text):
    1. set maximum damage delay of victim to 0 seconds
     
  5. StunningListen

    Joined:
    Aug 26, 2020
    Messages:
    14
    Likes Received:
    0

    i added that but it doesnt work still

    on damage:
    if damage cause is projectile:
    if attacker is holding bow:
    if colored name of attacker's tool is "&aKhryselakatos":
    set maximum damage delay of victim to 0 seconds
     
  6. Hykz

    Hykz Member

    Joined:
    May 8, 2017
    Messages:
    28
    Likes Received:
    3
    can you prove the code for the machine gun "&aKhryselakatos" so i can test it, it works for me when i normally attack a player

    or maybe try changing "if attacker is holding a bow" to "if attacker's tool is a bow"
     
  7. StunningListen

    Joined:
    Aug 26, 2020
    Messages:
    14
    Likes Received:
    0


    i put a bunch of broadcasts under the on damage event to see if it would detect anything and it didn't

    on shoot:
    shooter is player
    "%projectile%" is "arrow"
    name of tool of shooter is "&aKhryselakatos"
    {nospam::%shooter%} is not set
    set {nospam::%shooter%} to true
    cancel event
    loop 3 times:
    shooter has an arrow
    remove 1 arrow from shooter
    make shooter shoot a arrow at speed 2
    wait 3 ticks
    delete {nospam::%shooter%}

    on damage:
    if damage cause is projectile:
    if attacker's tool is bow:
    if colored name of attacker's tool is "&aKhryselakatos":
    set maximum damage delay of victim to 0 seconds
     
  8. Hykz

    Hykz Member

    Joined:
    May 8, 2017
    Messages:
    28
    Likes Received:
    3
    change "damage cause is projectile" to "damage cause is a projectile", for some reason it doesnt work without the " a projectile"
     
  9. StunningListen

    Joined:
    Aug 26, 2020
    Messages:
    14
    Likes Received:
    0
    it works now thanks
     
  10. Hykz

    Hykz Member

    Joined:
    May 8, 2017
    Messages:
    28
    Likes Received:
    3
    No problem
     
Thread Status:
Not open for further replies.

Share This Page

Loading...