I've tried figuring out these on my own, but I am stumped! I'm still a total noob, so I was hoping people could fix these scripts for me!
1.) The first script is in an area trigger, activated OnEnter. I want the NPC to initiate dialogue with the PC, it works fine, BUT I want them only to do it once. ---instead they walk up to the PC every time I enter the trigger----
- int StartingConditional()
- {
- // Inspect local variables
- if(!(GetLocalInt(GetPCSpeaker(), "LOCAL_INT_TAG1") == TRUE)) return FALSE;
- return TRUE;
- }
- void main()
- {
- object oNPC = GetObjectByTag("NPC_TAG");
- object oPC = GetEnteringObject();
- if(GetIsPC(oPC) &&
- //GetLocalInt(oPC,"Dlg_Init_" + GetTag(oNPC)) == FALSE &&
- !IsInConversation(oNPC))
- {
- AssignCommand(oPC,ClearAllActions());
- AssignCommand(oNPC,ClearAllActions());
- AssignCommand(oNPC,ActionMoveToObject(oPC));
- AssignCommand(oNPC,ActionStartConversation(oPC));
- }
- SetLocalInt(GetPCSpeaker(), "LOCAL_INT_TAG1", TRUE);
- }
- void main()
- {
- object oPC = GetEnteringObject();
- object oDisplay = GetObjectByTag("DISPLAY_HERE");
- if (GetLocalInt(oPC, "Saw_Trigger_Text") == FALSE)
- {
- AssignCommand(oDisplay, SpeakString("The weather is terrible today"));
- SetLocalInt(oPC, "Saw_Trigger_Text", TRUE);
- }
- }
- NPC1: "The weather is terrible today."
- NPC2: "You can say that again, I'm getting soaked standing here in the rain."
- NPC1: "Good point. Why are we talking outside?"
- NPC2: "Beats me...."
- *loops back to the start*
I am a big scripting noob, so if anyone could help me with these two scripts, that would be amazing!!!





Retour en haut






