Server Totals
Wilderness - (6)
Mikona - (3)
Deglos - (1)
Ferrell - (0)
Elysia - (0)
M'Chek - (0)
Le'Or - (0)
Visimontium - (0)
Underdark - (0)
Total players: 10
Gallery

Links Menu

NPC speech on entering trigger?

Moderators: Nighthawk4, Dungeon Masters

NPC speech on entering trigger?

PostAuthor: Final Shinryuu » Fri Aug 26, 2005 8:06 pm

Yay, I need more help again. :)
I'm making a series of waypoints that walk some NPC's around an area. I want to put a trigger somewhere in there, and make it so that when one of the NPC's enters it, he says something. How would I do that?
User avatar
Final Shinryuu
Sage
 
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

PostAuthor: fremen » Fri Aug 26, 2005 10:14 pm

Code: Select all
void main(){

object oEntering = GetEnteringObject();
   
if (GetIsPC(oEntering)) //If you only want this for NPC's
     return;

AssignCommand(oEntering, ActionDoCommand(SpeakString("He's one bad moth'r... Shut your mouth")));

}


Put this in the triggers onEnter script. This should do it, but I'm not really sure if it'll go before all the other actions in the npc's action queue.

fremen
Squire of Babble
 
Posts: 46
Joined: Fri Jul 02, 2004 6:53 pm

PostAuthor: Final Shinryuu » Fri Aug 26, 2005 10:28 pm

Thanks, Fremen, I'll give it a try.
User avatar
Final Shinryuu
Sage
 
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Blue Wolfy, Google [Bot]