Jump to content

Home

Scripting NPC Death


darthtyren

Recommended Posts

Just create a node after the line he's supposed to say and apply the script to that node...

 

If - however - you want to do the same effect with scripting you'll want to use the following:

 


void main()
{
               ActionPauseConversation();
	object oNPC = GetObjectByTag("NPC_TAG_HERE");

	effect eDeath = EffectDeath();

	DelayCommand(AMOUNT_OF_SECONDS, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDeath, oNPC));

               ActionResumeConversation();

}

 

You'll have to replace AMOUNT_OF_SECONDS with the length of the soundfile in seconds.

 

Hope that helps

 

Fastmaniac

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...