HdVaderII Posted July 7, 2008 Share Posted July 7, 2008 Does anyone know the basic script i can use (for TSL) that makes an NPC run up to the PC? Link to comment Share on other sites More sharing options...
Tupac Amaru Posted July 7, 2008 Share Posted July 7, 2008 void main() { object oRunner = GetObjectByTag("Kreia"); object oTarget = GetFirstPC(); int bRun = TRUE; float fRange = 1.0; AssignCommand(oRunner, ClearAllActions()); AssignCommand(oRunner, ActionForceMoveToObject(oTarget, bRun, fRange)); } Replace the tag of oRunner with the tag of your NPC. The parameter fRange controls how close the character will run up to the PC. You can increase the value so the NPC stops further away. Link to comment Share on other sites More sharing options...
HdVaderII Posted July 7, 2008 Author Share Posted July 7, 2008 Thanks. I forgot how to do the GetFirstPC function. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.