lfnetwork.com mark read register faq members calendar

Thread: conditional spawning of multiple Npcs
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 06-23-2009, 12:05 PM   #1
Hunters Run
Rookie
 
Hunters Run's Avatar
 
Join Date: Jun 2009
Location: the same place as gnus
Posts: 117
Current Game: Assassins creed
conditional spawning of multiple Npcs

This is for tsl

I am trying to spawn three npcs (let us call them twilek_thug1,2,and3 respectively ) and have them initiate a conversation with the pc after the Global Boolean 203Tel_Slusk_Dead has been activated. I have already tried several scripts yet these thugs refuse to appear.
Any help help/advice will be greatly appreciated.
Hunters Run is offline   you may: quote & reply,
Old 06-23-2009, 01:45 PM   #2
zbyl2
Junior Member
 
zbyl2's Avatar
 
Join Date: May 2008
Location: a galaxy far far away...
Posts: 320
Contest winner - Modding Veteran Modder 
If you'd post scripts you made, maybe someone would be able to find out what's wrong with them.
Anyway, I don't know where you want to fire your script, but here is code that should spawn your NPCs:
Code:
      if(GetGlobalBoolean("203Tel_Slusk_Dead")) { 
               CreateObject(OBJECT_TYPE_CREATURE, "twilek_thug1", Location(Vector(0.0, 0.0, 0.0), 0.0f));    
               CreateObject(OBJECT_TYPE_CREATURE, "twilek_thug2", Location(Vector(0.0, 0.0, 0.0), 0.0f));                
               CreateObject(OBJECT_TYPE_CREATURE, "twilek_thug3", Location(Vector(0.0, 0.0, 0.0), 0.0f)); 
       }
Of course, you will also need to change all those "0.0" to X, Y and Z coordinates where you want your NPC spawned.
zbyl2 is offline   you may: quote & reply,
Old 06-23-2009, 05:22 PM   #3
Hunters Run
Rookie
 
Hunters Run's Avatar
 
Join Date: Jun 2009
Location: the same place as gnus
Posts: 117
Current Game: Assassins creed
Thanks for the quick reply.
Well, it works and they're spawned. However I am unable at the moment to initiate a conversation with them. No worries, I'll "mess around" so to speak and and see what I can do about that.

edit: I have managed to have them spawn on a trigger and initiate a conversation. However they keep spawning. Is there a way I can have them spawn only once.

Last edited by Hunters Run; 06-23-2009 at 07:22 PM. Reason: status update.
Hunters Run is offline   you may: quote & reply,
Old 06-24-2009, 05:08 AM   #4
zbyl2
Junior Member
 
zbyl2's Avatar
 
Join Date: May 2008
Location: a galaxy far far away...
Posts: 320
Contest winner - Modding Veteran Modder 
To spawn them just once, you may add this to your trigger OnEnter script:

Code:
    if(GetLocalBoolean(OBJECT_SELF, 20)) {
              return;
              }


SetLocalBoolean(OBJECT_SELF, 20, 1);
It will set local boolean for trigger when you enter this, but it won't do anything if local is already set (when you enter trigger for second time).
zbyl2 is offline   you may: quote & reply,
Old 06-24-2009, 04:18 PM   #5
Hunters Run
Rookie
 
Hunters Run's Avatar
 
Join Date: Jun 2009
Location: the same place as gnus
Posts: 117
Current Game: Assassins creed
well I tried that script but they kept spawning then I tried

Code:
DestroyObject(OBJECT_SELF);
and it worked.

on another note, how do I give a npc a twilek voice over and lipsyncing?

edit: it occurs to me in hindsight that I should be more clear. What I want to do is give the twileks twilek voices yet even though I put the correct number in the alienrace node of the dlgeditor all I get is silence.

Last edited by Hunters Run; 06-25-2009 at 03:19 PM. Reason: clarification
Hunters Run 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 > conditional spawning of multiple Npcs

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 12:53 PM.

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