NPC speech on entering trigger?

Moderator: Event DM

Post Reply
User avatar
Final Shinryuu
Sage
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

NPC speech on entering trigger?

Post by 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?
fremen
Squire of Babble
Posts: 46
Joined: Fri Jul 02, 2004 6:53 pm

Post by 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.
User avatar
Final Shinryuu
Sage
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

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

Thanks, Fremen, I'll give it a try.
Post Reply