What is damage event?

Avatar

By DreamingWarlord 7 August 2019 17:38

Member · 5 comments

What is taking damage event? I need it for my script.


Bagels.

Avatar

By icewormy3 7 August 2019 17:44

Member · 729 comments

use this:
if (mc.thePlayer.hurtTime > 0) {
        //your code here

Avatar

By icewormy3 7 August 2019 17:48

Member · 729 comments

for the event, use onUpdate

Avatar

By DreamingWarlord 7 August 2019 17:48

Member · 5 comments

how do I get the attacker?


Bagels.

Avatar

By Shiv3R 8 August 2019 06:32

Member · 178 comments

now better to use is onAttack(event). With it you can even see who is attacking you etc.

Avatar

By Senk Ju 8 August 2019 13:08

Administrator · 708 comments

You cannot get the entity which dealt you damage.


CCBlueX Co-Owner

Avatar

By Shiv3R 8 August 2019 19:42

Member · 178 comments
Senk Ju wrote

You cannot get the entity which dealt you damage.

my bad