Page 1 of 1

Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 10:57 am
by SuperWingedYoshi
Hi everyone!

I need help for something concerning the level editor. I'm currently creating a boss fight for a level and I'd like to add some spice to that boss fight. Whenever the boss takes damage, I'd like to have something shoot up from the ground that the player needs to dodge (aka, an event occurs that activates a generator). However, I don't know what to tell the level editor so it actually does what I desire.
The Events window offers "Death", "Activate", "Talk" and "No More Objects In Layer". I know that "Death" occurs when the boss dies, "Activate" can occur when the object appears on the screen, "Talk" can occur when the player talks to that NPC, and "No More Objects In Layer" occurs when the layer is empty. But are there more functions than these, possibly, so I could make an event happen when the NPC/boss takes a hit? Or if it's not possible, what's a good alternative I could use?

Thanks in advance.

Re: Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 11:05 am
by HealthyMario
I guess you can make the boss die first, then use layers and events to make the same boss appear again in another layer, at the same time, make the things you want the player to dodge in another layer, then make an event and put the boss layer (2nd time) and the things mario need to dodge in show layers. And so you will have both the boss and obstacles at the same time.

I hope this works and you're happy with that.

Re: Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 11:05 am
by RudeGuy
Sorry, but that's impossible with bosses. With normal NPCs you can do that.

Re: Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 11:07 am
by bossedit8
You can do something like "Take the Boss Character several hits while he is standing" action. Use a NPC that can Damage another NPC like a SMW Kamikaze Koopa, a Grinder or almost any shooting Projectiles but the problem is while doing that you can hear the Boss' Hitting/Hurting Sound (SMW Kamikaze Koopa is the best to utulize correctly because he isn't making a lot of sounds as the others). Make a specific timer when the SMW Kamikaze Koopa (or others) is gonna disappear. The longer the NPC stays while hurting another NPC, the higher the damage takes on it. If you are done completly by your level, make the NPC that hurts the Boss Invisible.

Re: Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 11:28 am
by SuperWingedYoshi
Thanks for your suggestions so far!
HealthyMario wrote:I guess you can make the boss die first, then use layers and events to make the same boss appear again in another layer, at the same time, make the things you want the player to dodge in another layer, then make an event and put the boss layer (2nd time) and the things mario need to dodge in show layers. And so you will have both the boss and obstacles at the same time.

I hope this works and you're happy with that.
Yeah, I've seen someone else do that for his project already, that works. However, my boss replaces Mother Brain, taking 9 hits to kill, and I want the event to happen after each hit. If anything, I'd have to modify the boss HP, which can be done with LunaDLL, but I haven't got around to installing LunaDLL yet.
Alternatively, I could just make my boss replace a Goomba (lol) and then I could use the Death event and make the same boss appear in a different layer. However, that's the last option, if all else fails.
Christian07 wrote:Sorry, but that's impossible with bosses. With normal NPCs you can do that.
That's because most normal NPC's (except for Rex, the big Piranha Plants and Big Boo) can be killed with one hit, there you can use the Death event.
bossedit8 wrote:You can do something like "Take the Boss Character several hits while he is standing" action. Use a NPC that can Damage another NPC like a SMW Kamikaze Koopa, a Grinder or almost any shooting Projectiles but the problem is while doing that you can hear the Boss' Hitting/Hurting Sound (SMW Kamikaze Koopa is the best to utulize correctly because he isn't making a lot of sounds as the others). Make a specific timer when the SMW Kamikaze Koopa (or others) is gonna disappear. The longer the NPC stays while hurting another NPC, the higher the damage takes on it. If you are done completly by your level, make the NPC that hurts the Boss Invisible.
Of course it's correct what you're saying... That'd be a "Survive longer than the boss" mini-game, then. However, I don't want a Kamikaze Koopa or Grinder to deal damage for me and then disappear again... I want to throw stuff at the boss myself and when I hit the boss, I wanna make a layer with a generator appear for a short while...

Re: Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 11:35 am
by bossedit8
Well, what I ment is something like this:



Original Link: http://www.youtube.com/watch?v=kqTPVbAUJyU

I made it so the boss will take Damage on the first form and the second form while the Kamikaze Koopa NPC is invisible yet it can damage the boss. This makes the fight not tediously long. No idea if that is even the solution though.

Re: Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 11:47 am
by SuperWingedYoshi
bossedit8 wrote:Well, what I ment is something like this:



Original Link: http://www.youtube.com/watch?v=kqTPVbAUJyU

I made it so the boss will take Damage on the first form and the second form while the Kamikaze Koopa NPC is invisible yet it can damage the boss. This makes the fight not tediously long. No idea if that is even the solution though.
I see now. (Good job on the Pom Pom boss, by the way! She's not exactly like her SM3DL/SM3DW counterpart, but it comes pretty close!) That's not really what I want, however. My boss replaces Mother Brain, therefore has only one form, and I want the boss to only take damage when the player hits it with a projectile (e.g. a mushroom block, veggies or a bomb). I don't want a Kamikaze Koopa to deal damage for me every ten seconds...

Any other suggestions? Otherwise I'll do what HealthyMario said.

Re: Event when an NPC takes damage?

Posted: Sat Jul 05, 2014 9:59 pm
by Dr. Crygor
You can cover the npc with bricks in a nother layer and make them run an event when theyre hit