PDA

View Full Version : Dialog on Death


Marius Fett
12-31-2007, 12:34 PM
I'm trying to make it so that when a NPC dies a dialog fired.

I compiled this script:


void main()
{
ActionStartConverstaion(GetFirstPC(), "void_end", 0, 0, 0, "", "", "", "", "", "", 0);
}


And set it as the NPC's OnDeath script.

But it's not working!
What did I do wrong?

tk102
12-31-2007, 12:40 PM
Hmm, kind of like a Catch-22 there. To get the NPC's dialog to start, you have to kill the NPC, but...

:D

Silveredge9
12-31-2007, 12:40 PM
It's not working because your script tells the NPC that the script is attached to, to start the dialogue with the PC. But since you killed him, he's unable do that.

Your best bet would be to make it so the PC is the entity that is responsible for starting the dialogue. Something like...

void main()
{
object oPC = GetFirstPC();

AssignCommand(oPC,ActionStartConversation(GetFirst PC(),"void_end"));

}



(Take the space out of "GetFirstPC". It isn't displaying correctly) :P

Marius Fett
12-31-2007, 12:48 PM
Thanks Silver!