Calling all scripting geniuses ! I’ve got two tried and tested scripts that worked before but don’t now when I use them in a different situation. I’ve checked the tags, put them in the right place, compiled them and for some reason they don’t fire.
Script 1. To blast a nasty little man from a conversation, he gets the ga_death two lines later in the conversation so is still alive to take the hit…
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = GetObjectByTag("trader_estate2");
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_HIT_SPELL_FINGER_OF_DEATH), oTarget);
}
Script 2. A man dies and a conversation starts, oTarget is a hidden invisible tiny kobold so it can’t be killed and is always available to own the conversation…
void main()
{
object oPC = GetLastKiller();
object oTarget;
oTarget = GetObjectByTag("freddead_kob");
AssignCommand(oTarget, ClearAllActions(TRUE));
DelayCommand(2.0, AssignCommand(oTarget, ActionStartConversation(oPC,"sewer_freddead",FALSE,FALSE,TRUE,FALSE)));
}
I have no idea why these wont work when they worked before, they both come from old modules of mine and the second one I’ve used recently in my new one and I’ve got no idea what’s wrong this time.
Thank you.