In the beginning of my module, the player has a story important henchman with him. At the same time, there are some battles in which the henchman can die.
If I make the henchman immortal, the battles become a piece of cake because the player can leave the enemies to him.
Making the henchman to not die but to become unconscious instead until the battle is over is not a good idea. The player can still run far away and disengage from battle, and what if he has transitioned to another area?
Showing game over window if the henchman dies seems very direct to me.
Could you please give me some ideas how can I solve this problem?
Henchman should not die permanently
#1
Posté 04 août 2016 - 01:51
#2
Posté 04 août 2016 - 04:51
#3
Posté 05 août 2016 - 02:51
I currently use a system similar to the one Proleric described. I set a variable IS_DYING on the henchman, then use the KeepDead()/StopKeepingDead() functions to incapacitate them when they are down to 1 HP. The player can use a spell or potion to heal them, or rest, after which the henchman revives with the appropriate HPs. A heartbeat script also checks if there are enemies left in the area - if not, they reviive with 1 HP. They player can also choose to wait if he himself is "killed," and any capable henchmen will attempt to use available potions or spells to revive him.
- Grymlorde aime ceci
#4
Posté 05 août 2016 - 06:40
A nuance of my method is that the henchman is actually dead, but not selectable, so I don't have to ensure they're inactive while "unconcious".
#5
Posté 05 août 2016 - 09:25
Great ideas, thanks. How do you proceed when the current area is big and there are many hostiles all over the place? Do you check for range around the fallen henchman?
#6
Posté 05 août 2016 - 03:57
#7
Posté 05 août 2016 - 10:33
Great ideas, thanks. How do you proceed when the current area is big and there are many hostiles all over the place? Do you check for range around the fallen henchman?
I've been experimenting with a few different methods to see which best suits the module I'm working on. Keep in mind it's single-player only, and story-driven versus hack and slash so I'm more concerned with enjoyable game flow than strict adherance to standard rules. Right now, I'm using NW_ASC_MODE_DYING to keep them in their unresponsive state, and in the heartbeat script, I check for LastHostileActor() so they don't recover if being actively attacked. This could easily be altered to check for the nearest enemy instead.
if (GetAssociateState(NW_ASC_MODE_DYING))
{
if (GetCurrentHitPoints()>1)
{
SetAssociateState(NW_ASC_MODE_DYING,FALSE);
ClearAllActions();
StopKeepingDead();
}
else if (!GetIsObjectValid(GetLastHostileActor()))
{
SetAssociateState(NW_ASC_MODE_DYING,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_RESTORATION),OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(OBJECT_SELF)),OBJECT_SELF);
ClearAllActions();
ghApplyDeathPenalty(OBJECT_SELF);
StopKeepingDead();
}
else
{
KeepDead();
return;
}
}
Parameters such as how much health should be recovered can be easily adjusted, as this is still a work in progress.
It should also be noted that I apply a curse effect through ghApplyDeathPenalty() that reduces all stats by one, cumulatively, each time the rez occurs, until removed by an NPC healer. This eventually renders the henchman basically useless, and hopefully discourages abuse of their auto-rez. This also discourages players from spamming respawn to get through encounters, since they get the curse as well.





Retour en haut







