disable invincibility after being hit

  • 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.
Aug 26, 2020
14
0
1
30
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
 
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...?
 
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.
 
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.

You can actually remove this using skellett:
Code:
set maximum damage delay of victim to 0 seconds
 
You can actually remove this using skellett:
Code:
set maximum damage delay of victim to 0 seconds


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
 
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"
 
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"



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
 
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
change "damage cause is projectile" to "damage cause is a projectile", for some reason it doesnt work without the " a projectile"
 
Status
Not open for further replies.