tylerjk Posted April 25, 2005 Posted April 25, 2005 How do I write a script that will make a npc fight me? Like if I wanted to talk to him then say I want to kill you or say join my party or something. I just need to see what that script would look like.
stoffe Posted April 25, 2005 Posted April 25, 2005 Originally posted by tylerjk How do I write a script that will make a npc fight me? Like if I wanted to talk to him then say I want to kill you or say join my party or something. I just need to see what that script would look like. If you want the one you speak to to go hostile and attack you, a script like this on the ending node of that conversation branch would probably work: #include "k_inc_generic" void main() { object oPC = GetPCSpeaker(); ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_HOSTILE_1); DelayCommand(0.5, GN_DetermineCombatRound(oPC)); } EDIT: Or, if you are feeling efficient you could use the script "a_atkonend" that comes with the game, and apparently does pretty much the same thing. Figured there would be a generic script doing this already.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.