Evening all. I'm having a bit of an issue with a script, and hope someone can show me the error of my ways.
'>
The principals in this script are the PC, Leila, (the owner of the convo) and Jassad (ultimate hostile actor). Implementation is that this is being called in an action_taken handle of a conversation owned by Leila, on a PC line [End Dialogue].
What works:
Not much truth be told. All that happens is that Jassad indeed goes hostile, but he does not attack Leila nor the PC. I've tinkered and tweaked til I'm blue in the face, but am getting no closer. Can someone please take a look and say "oh yes, put this there and that there and it will fire" lol
#include "nw_i0_generic"
object oPC = GetPCSpeaker();
object oLeila = GetNearestObjectByTag("nh_Leila");
object oJassad = GetNearestObjectByTag("muo_jasaadalshad");
effect eVFX;
// Get the PC who is in this conversation.
void AttackPC()
{
AdjustReputation(oPC, oJassad, -100);
SetIsTemporaryEnemy(oPC, oJassad);
AssignCommand(oJassad, DetermineCombatRound());
}
void main()
{
// Remove plot flag from Leila so we can kill her
SetPlotFlag(oLeila, FALSE);
// Have Leila say something.
AssignCommand(oLeila, ActionSpeakString("No my love! Resist! Resist!!"));
// Have Jassad attack Leila by having him fake-cast Implosion.
AssignCommand(oJassad, ActionCastFakeSpellAtObject(SPELL_IMPLOSION, oLeila));
effect eVFX = EffectVisualEffect(VFX_FNF_IMPLOSION);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oLeila);
// Destroy Leila.
DestroyObject(oLeila, 2.0);
// Have text appear over the PC's head.
DelayCommand(3.0, AssignCommand(oJassad, ActionSpeakString("And now ~YOUR~ turn!")));
// Attack the PC.
DelayCommand(3.1, AttackPC());
}
Modifié par WoC_Builder, 14 février 2013 - 05:29 .