lfnetwork.com mark read register faq members calendar

Thread: Closest NPC Dialog script?
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 12-21-2013, 10:13 PM   #1
supreme kotor
Junior Member
 
supreme kotor's Avatar
 
Join Date: Mar 2013
Location: I'm lost.
Posts: 326
Current Game: Modding.. Wait is that a game?
Closest NPC Dialog script?

Hey guys Supreme Kotor here

I would first like to apologize for how my previous mods ended and for my leaving of the community, I gave up on modding. A few days ago I realized my mistake and would like to return to modding.

Now for my question, I was wondering what would be the code for a script that starts a dialog with the closest NPC? If this isn't possible I understand why, but I know that you can get NPC's, placables, and etc... Through code like this:
Show spoiler
So I feel as if what I am asking should be just an adaption of this code.

Thanks- Supreme Kotor


Current WIP: Learning to mod Kotor
supreme kotor is offline   you may: quote & reply,
Old 12-22-2013, 06:33 PM   #2
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,288
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
It should look a little like this:

Code:
void main()
{

   object oPC = GetFirstPC();
   object oNearest = GetNearestObject(OBJECT_TYPE_CREATURE, oPC);

      AssignCommand(oNearest, ActionStartConversation(oPC));

}
I haven't tested this at all but it should work. Also, I made the object a creature as I'm assuming you only want to talk with NPCs, not placeables or anything of that sort.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 12-23-2013, 11:34 AM   #3
supreme kotor
Junior Member
 
supreme kotor's Avatar
 
Join Date: Mar 2013
Location: I'm lost.
Posts: 326
Current Game: Modding.. Wait is that a game?
Yeah that script works! Thanks FG


Current WIP: Learning to mod Kotor
supreme kotor is offline   you may: quote & reply,
Old 12-24-2013, 04:14 PM   #4
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,288
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
Quote:
Originally Posted by supreme kotor View Post
Yeah that script works! Thanks FG
Glad I could help.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian 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 > Closest NPC Dialog script?

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 04:09 AM.

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