Initiate chat by npc
by unknown posted previously in scripting
I couldn't get Pavel's script to work for me for some reason
this one does though.
void main(){
object oNPC = GetObjectByTag("put_npc_tag_here");
object oPC = GetEnteringObject();
if(GetIsPC(oPC) &&
IsInConversation(oNPC) == FALSE &&
GetObjectSeen(oPC,oNPC))
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oNPC, ClearAllActions());
AssignCommand(oNPC, ActionMoveToObject(oPC));
AssignCommand(oNPC, ActionStartConversation(oPC));
}
}
The DM needs to login to a new module so he can't use the
mod transition.
_________________
Play where it means your life!
Psychothriller
http://www.psychothriller.com
Centurion, USB
--------------------------------------------------------------------------------------
Quote: Posted 06/23/02 03:56:07 (GMT) by TheOnlyD
kludge. It looks like your NPC Iniating conversation script will work,
but I need ot know where to put it.
In the NPCs onSpawn script? on a trigger's onEnter script?
what?
Put it in a trigger on enter and the monster should be
inside the trigger box. Orange Coke, you can do the same,
just place an invisible object inside the trigger and
delete the move to line also you could just use the send
message to player like I do on entering Psychothriller.
void main()
{
object oPlayer;
oPlayer = GetEnteringObject();
SendMessageToPC(oPlayer,"Welcome to Psychothriller! This world is under
construction and can go down at any time. I'll always try to give notice
before a shutdown. Crashes are tough though :> Please send crash reports to
thepsychothriller@yahoo.com");
}
_________________
Play where it means your life!
Psychothriller
http://www.psychothriller.com
Centurion, USB
|