View Single Post
Old 02-06-2007, 11:17 AM   #9
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by Miltiades
That first script didn't work, at least not with me. The NPC still follows me from as soon as I enter the module.
Oops, seems like I got one negation too many in the script. Remove the ! character on the line...

&& !GetLocalBoolean(OBJECT_SELF, 60)

...under the first if-statement, and it should hopefully work better. (It would be causing the NPC to follow when the variable was not set, instead of when it was set.)

Quote:
Originally Posted by Miltiades
Also, if I want the NPC to attack, and I need the second script for it, how do I implement the second script into the first?
You don't, they are scripts for two separate events (assuming you don't mean the oneliner dialog action script when you say "the second script"). The first script posted was a custom script for the OnHeartbeat event of the NPC, while the third script was a custom script for the OnCombatRound event. You set them both in the UTC template of the NPC who should follow/attack (the Scripts tab if you use KotorTool's UTC editor).

stoffe is offline   you may: quote & reply,