Jump to content

Home

OnNotice


Ravager

Recommended Posts

The easiest way is to the TalkedTo variable that every character has. Use the command UT_SetTalkedToBooleanFlag(OBJECT_SELF); in the onNotice script to set that variable the first time you talk the PC. Then add a check with UT_GetTalkedToBooleanFlag(OBJECT_SELF); so that the conversation doesn't trigger again.

#include "k_inc_utility"
void main() {
   // Start conversation only if the TalkedTo flag has not been set.
   if(!UT_GetTalkedToBooleanFlag(OBJECT_SELF)) {
       UT_SetTalkedToBooleanFlag(OBJECT_SELF); // Set the the TalkedTo flag
       ActionStartConversation(GetFirstPC());
   }
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...