PDA

View Full Version : npc help


n1gamer
05-02-2007, 05:25 PM
I was woundering how do i get an npc i created to attack me when a certain
dialog line is choosen.

Thanks n1gamer

tk102
05-02-2007, 07:09 PM
In the last dialog branch, attach a script that changes the faction of the creature. Something like this:
void main() {
ChangeToStandardFaction(OBJECT_SELF,1); // become an enemy
ExecuteScript("k_ai_master",OBJECT_SELF,1002); //forces perception of you
}

Edit: updated this to invoke the call to k_ai_master

n1gamer
05-03-2007, 05:32 AM
Thanks for the help tk102