In playtesting this script was rock-solid. No problems. I have tested dozens of times without problems but since release I have had 2 reports that this conversation won't start. Any help is appreciated.
/*Clears combat state of all characters, raises any dead ones. Starts appropriate convo.
*/
void main()
{
string sConversation = GetLocalString(OBJECT_SELF, "sConversation");
//define in terms of first PC and not GetLastKiller() just in case the
//falling icicle placeable lands the death blow
object oTalker = GetFirstPC();
object oBlaerdrig = GetObjectByTag("blaerdrig");
object oAyale = GetObjectByTag("ayale");
effect eResurrect = EffectResurrection();
if(GetIsDead(oTalker))
{
// ActionCastSpellAtObject(SPELL_RAISE_DEAD,oTalker,METAMAGIC_ANY,TRUE,9,PROJECTILE_PATH_TYPE_DEFAULT,TRUE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eResurrect,oTalker);
int nHP = GetCurrentHitPoints(oTalker);
int nDamage = nHP-1;
// eDamage = EffectDamage(nDamage);
}
if(GetIsDead(oAyale))
{
// ActionCastSpellAtObject(SPELL_RAISE_DEAD,oTalker,METAMAGIC_ANY,TRUE,9,PROJECTILE_PATH_TYPE_DEFAULT,TRUE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eResurrect,oTalker);
int nHP = GetCurrentHitPoints(oAyale);
int nDamage = nHP-1;
// eDamage = EffectDamage(nDamage);
}
if(GetIsDead(oBlaerdrig))
{
// ActionCastSpellAtObject(SPELL_RAISE_DEAD,oTalker,METAMAGIC_ANY,TRUE,9,PROJECTILE_PATH_TYPE_DEFAULT,TRUE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eResurrect,oTalker);
int nHP = GetCurrentHitPoints(oBlaerdrig);
int nDamage = nHP-1;
// eDamage = EffectDamage(nDamage);
}
AssignCommand(oAyale,ClearAllActions(TRUE));
AssignCommand(oBlaerdrig,ClearAllActions(TRUE));
AssignCommand(oTalker,ClearAllActions(TRUE));
DelayCommand(5.0,FadeToBlack(GetFirstPC(),FADE_SPEED_MEDIUM,2.5));
DelayCommand(6.5,AssignCommand(oTalker,ClearAllActions(TRUE)));
DelayCommand(7.0,AssignCommand(oTalker,ActionStartConversation(OBJECT_SELF,sConversation, FALSE,FALSE,TRUE)));
//destroy triggers associated with the troll
//destroys trigger
DestroyObject(GetObjectByTag("2027_arctic_fell_troll_hostile_tgr"),5.0);
DestroyObject(GetObjectByTag("2027_tgr_fell_troll_warning"));
DestroyObject(GetObjectByTag("2027_tgr_arctic_fell_troll"));
}
Conversation not firing from this death script in some instances
Débuté par
M. Rieder
, mars 19 2012 11:24
#1
Posté 19 mars 2012 - 11:24
#2
Posté 19 mars 2012 - 12:07
Instead of having the conversation listener be OBJECT_SELF, the dead NPC, change that to oTalker. That may do the trick and make it more stable.
Modifié par Shaughn78, 19 mars 2012 - 12:07 .
#3
Posté 19 mars 2012 - 12:31
is this the troll's OnDeath ?
I think this is the problem, if you kill the troll and immediatly loot it (that's what I was going to do), the corpse will decay in 5 seconds, but, since the conversation is delayed by 7 seconds, the corpse is destroyed = no conversation.
I think this is the problem, if you kill the troll and immediatly loot it (that's what I was going to do), the corpse will decay in 5 seconds, but, since the conversation is delayed by 7 seconds, the corpse is destroyed = no conversation.
Modifié par Artemis Absinthe, 19 mars 2012 - 12:33 .
#4
Posté 19 mars 2012 - 01:01
Thanks Shaugn and Artemis. I'll try both of these. It's gong to be hard to be sure when I fix it because I cannot recreate it on my computer. I tried looting the corpse one time, but that didn't trigger the bug, but I'll try again.
#5
Posté 19 mars 2012 - 01:16
Have you tried to kill it while possessing Blaerdrig or Ayale ?
I didn't trigger the bug either, but I always control my character (the wizard) in fight.
I didn't trigger the bug either, but I always control my character (the wizard) in fight.
#6
Posté 20 mars 2012 - 12:14
I tried killing it with Ayale. You would need an acid or fire flask to kill it as blaerdrig, and I did not have one while testing. Also didn't have flaming sword. I guess I could enchant his sword though...
#7
Posté 21 mars 2012 - 07:59
I'd like to help but I am not sure of what you exactly want to achieve.
As
the listener is likely not the dead NPC, you should either put the
listener in the ActionStarConversation statement or the PC himself as
mentionned by Shaugn. Also the delays are too long as mentioned too. The
player has too much time to click on something killing the convo as mentionned by Artemis. You may also ForceRest the party so the convo can't be killed if a required member fell unconscious again.
A 100% sure trick is :
- to update the journal in OnDeath script warning the player is has to talk to someone or something. It could be one the companion, another NPC or even a placeable tagged 'plot' (to prevent it to be destroyed).
So if for whatever reason the convo does not fire, the player knows he has to fire it 'manually'. Update again the journal in the convo.
Of course for a companion you have to include the lines in the companion's regular convo.
Hope it helps.
As
the listener is likely not the dead NPC, you should either put the
listener in the ActionStarConversation statement or the PC himself as
mentionned by Shaugn. Also the delays are too long as mentioned too. The
player has too much time to click on something killing the convo as mentionned by Artemis. You may also ForceRest the party so the convo can't be killed if a required member fell unconscious again.
A 100% sure trick is :
- to update the journal in OnDeath script warning the player is has to talk to someone or something. It could be one the companion, another NPC or even a placeable tagged 'plot' (to prevent it to be destroyed).
So if for whatever reason the convo does not fire, the player knows he has to fire it 'manually'. Update again the journal in the convo.
Of course for a companion you have to include the lines in the companion's regular convo.
Hope it helps.
#8
Posté 23 mars 2012 - 11:07
Claudius, that is a fantastic idea. I'm going to try to play with that as well. Thanks.





Retour en haut







