Aller au contenu

Photo

Scripting help


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Primalrose

Primalrose
  • Members
  • 163 messages
I apologize if this seems to straight forward, but I'm wanting to basically make the PC unable to move right when they step on a trigger, have a nearby NPC come out of stealth and talk to the PC. After the conversation the NPC walks away. I've managed to get the NPC to talk to the PC but not sure how to go about the rest. Thanks for any help. 

#2
Kato -

Kato -
  • Members
  • 392 messages
Since you mention a trigger, it would look like this, called from the OnEnter event handler of the trigger:

object oPC = GetEnteringObject();
if(GetIsPC(oPC)) SetCommandable(FALSE, oPC);

And then at the end of the convo, called from one of the convo scripts:

object oPC = GetPCSpeaker();
SetCommandable(TRUE, oPC);


Kato