Jump to content

Home

Quick Scripting Question


goldberry

Recommended Posts

Does anyone have a "Die" Script I can use to make an NPC just fall over and die when a conversation ends?

 

I thought it was Destroy_Self or something, but that might have been another game I was modding XD.

 

Assuming that the NPC to die is the one you are conversing with, something like this should work if you place it on the last dialog node:

 

void main() {
   ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), OBJECT_SELF);
}

Link to comment
Share on other sites

(though you may want to wait and hear from a real scripter.. hehehe).. ;)

 

The self-professed unreal scripter (:p) is correct, the above mentioned standard script will return true (i.e. allow the node to show) if an item with the tag you specify as string parameter for the dialog node's conditional script you're running it from. It will check both equipped items on the main character and items in the party inventory, but not items equipped on party members other than the main character.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...