Hiya, I am have trouble with the (CRAP) bleed system script in Mannast basemodule. Once the PC is dying and recovers, it takes a while for the creature to attack him again. Leading to the crazy thing of it standing there while the PC gets up and walks away.
I have tried lowering the value (66.0) of the line below, and this helps a little
SetIsTemporaryNeutral(oDying, oEnemy, TRUE, 66.0);
I've also tried adding
ActionMoveAwayFromObject(oEnemy);
or
ActionMoveAwayFromObject(oDying);
so the creature moves away from the PC it thinks it has killed, since losing line of sight seems to sometimes restore hostility. And it makes sense, but I can't work out where to put the line for it to work, and if oEnemy or oDying is right.
Script is below, any advice much appreciated.
#include "crp_inc_ddr"
void main()
{
AssignCommand(oDying, ClearAllActions());
//Stop enemies from attacking...
int nNth = 1;
object oEnemy = GetNearestObject(OBJECT_TYPE_CREATURE, oDying, nNth);
while(GetIsObjectValid(oEnemy) && nNth <= 15)
{
if(GetReputation(oEnemy, oDying) <= 10)
{
//SendMessageToPC(oDying, GetName(oEnemy));
AssignCommand(oEnemy, ClearAllActions());
SetIsTemporaryNeutral(oDying, oEnemy, TRUE, 66.0);
DelayCommand(1.0, AssignCommand(oEnemy, DetermineCombatRound()));
}
nNth++;
oEnemy = GetNearestObject(OBJECT_TYPE_CREATURE, oDying, nNth);
}
//Give the PC at least a few rounds to bleed
int nHP = GetCurrentHitPoints(oDying);
if(nHP < -3)
{
effect eSet = EffectHeal((nHP * -1) -3);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSet, oDying);
}
//Determine the bleed delay
object oPartyMember = GetFirstFactionMember(oDying);
while (GetIsObjectValid(oPartyMember))
{
if(oPartyMember != oDying)
{
fBleedDelay = CRP_NORMAL_BLEED_DELAY;
break;
}
oPartyMember = GetNextFactionMember(oDying);
}
//Start Bleeding
AssignCommand(oDying, PlayVoiceChat(VOICE_CHAT_DEATH));
DelayCommand(fBleedDelay, AssignCommand(oDying, Bleed()));
}