Ravager Posted August 10, 2008 Posted August 10, 2008 Hi! I add script that starts dialogue in OnNotice, and it works but few seconds later when im near this npc, dialogue starts again. How can i change that?
Tupac Amaru Posted August 11, 2008 Posted August 11, 2008 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()); } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.