I have a boss demon in my fade area and 4 lesser rage deons, is there an event for when the creature have reached 50% health? The second question would then be, how can I make it so the 4 lesser rage demons does not appear at the beginning, but spawn out of the ground when the boss has reached 50%?
Two (simple?) questions
Débuté par
0x30A88
, oct. 28 2010 06:55
#1
Posté 28 octobre 2010 - 06:55
#2
Posté 28 octobre 2010 - 08:01
Question 1
I haven't tried it but I think comparing the boss demon's current health against the maximum health in its EVENT_TYPE_DAMAGED event would get you there.
GetMaxHealth and GetCurrentHealth functions can be found in core_h (though it's unlikley you'll have to specifically include it in an event script) so you should end up with something like this snippet:
Question 2
Place the minions in the area as normal but set them to inactive. In the above script use SetObjectActive function to make each of them appear.
If memory serves if you don't specify anything in nAnimation the creatures will play their default appear animation (for example spiders drop from above) but you can always specify another one using that parameter.
If the default animation suffices then you can also simplify things a bit by giving the minions a team number (different from their boss) and then using UT_TeamAppears (you may have to include utility_h).
I haven't tried it but I think comparing the boss demon's current health against the maximum health in its EVENT_TYPE_DAMAGED event would get you there.
GetMaxHealth and GetCurrentHealth functions can be found in core_h (though it's unlikley you'll have to specifically include it in an event script) so you should end up with something like this snippet:
float fCurrent = GetCurrentHealth(oBoss);
float fHalf = GetMaxHealth(oBoss) / 2;
if(fCurrent <= fHalf)
{
// activate minions!
}
Question 2
Place the minions in the area as normal but set them to inactive. In the above script use SetObjectActive function to make each of them appear.
If memory serves if you don't specify anything in nAnimation the creatures will play their default appear animation (for example spiders drop from above) but you can always specify another one using that parameter.
If the default animation suffices then you can also simplify things a bit by giving the minions a team number (different from their boss) and then using UT_TeamAppears (you may have to include utility_h).
Modifié par Sunjammer, 28 octobre 2010 - 08:13 .
#3
Posté 28 octobre 2010 - 11:42
Sunjammer's answers are totally correct and sufficient.
But I'm going to link the blog post where I extensively discuss the implementation of health-based boss phases anyway
But I'm going to link the blog post where I extensively discuss the implementation of health-based boss phases anyway
#4
Posté 29 octobre 2010 - 10:02
Bookmarked for when I get to bosses!
#5
Posté 30 octobre 2010 - 11:19
Thank you - sorry for not responding, was logged off last time I read it.
This is awesome indeed!
This is awesome indeed!





Retour en haut






