lfnetwork.com mark read register faq members calendar

Thread: I need a script. Again.
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-07-2008, 01:00 PM   #1
HdVaderII
I am le sad.
 
HdVaderII's Avatar
 
Join Date: Feb 2007
Location: Space. The final frontier.
Posts: 615
Current Game: Dark Forces. Yeah.
I need a script. Again.

Does anyone know the basic script i can use (for TSL) that makes an NPC run up to the PC?


Are you one of those poor Macintosh gamers that are in the possession of Empire at War, yet because of the scarcity of Mac players out there you have nobody to play against? If you are, PM me if you want to set up a game.

Last edited by HdVaderII; 07-07-2008 at 01:14 PM.
HdVaderII is offline   you may: quote & reply,
Old 07-07-2008, 01:53 PM   #2
Tupac Amaru
Junior Member
 
Tupac Amaru's Avatar
 
Join Date: Mar 2005
Location: Tahuantinsuyu
Posts: 273
Code:
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.
Tupac Amaru is offline   you may: quote & reply,
Old 07-07-2008, 04:44 PM   #3
HdVaderII
I am le sad.
 
HdVaderII's Avatar
 
Join Date: Feb 2007
Location: Space. The final frontier.
Posts: 615
Current Game: Dark Forces. Yeah.
Thanks. I forgot how to do the GetFirstPC function.


Are you one of those poor Macintosh gamers that are in the possession of Empire at War, yet because of the scarcity of Mac players out there you have nobody to play against? If you are, PM me if you want to set up a game.
HdVaderII is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > I need a script. Again.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:58 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.