Jump to content

Home

Adding to a Party Member's sidequest question


MasterWaffle

Recommended Posts

If I want a script to fire only if someone has reached a certain point in a party member's sidequest (or the end of that sidequest), what should I do? Say (for example) I want Dustil to reappear in a certain place only after Carth's sidequest is completed. What would it involve?

Link to comment
Share on other sites

You could use this script as the on enter and then in both execute scripts enter the old one;

void main() {

if ((GetJournalEntry("BlahBlah")==##))
   {

CreateObject(OBJECT_TYPE_CREATURE, "NPC_TAG", Location(Vector(-75.87156, -26.69725, 0.00000), 0.0));
ExecuteScript("RenamedOnEnter", OBJECT_SELF, 1002);    

   }
else {

ExecuteScript("RenamedOnEnter", OBJECT_SELF, 1002);    
}
}

Or you could just merge that into the existing on enter dpeneding on which is easiest for you.

 

--Stream

Link to comment
Share on other sites

So, how would I merge it into this script?

 

void main()
{

    object oEntering = GetEnteringObject();
    object oPC=GetFirstPC();

    if (GetIsPC(oEntering))
    {

         if (!GetIsObjectValid(GetObjectByTag("man26_griff_03")))
         {
              ExecuteScript("mangriff_26", OBJECT_SELF);
         }     
    }

    ExecuteScript("k_pman_26a_area2", OBJECT_SELF);
}

 

I want to make sure the NPC only spawns once. Would I just add the "if ((GetJournalEntry("BlahBlah")==##))" in front of the "if (!GetIsObjectValid(GetObjectByTag("man26_griff_03")))" script?

 

ETA: Oh, so I could put two different scripts depending on what I want to happen? So if I want the NPC to spawn only after a certain point I could put it after the journal entry script, and if that hasn't happened I could just put the script that fires after my edited on entry script?

 

Well that sentence doesn't make sense.

 

Example of what I'm talking about:

 

void main() {

if ((GetJournalEntry("k_missbroth")==TRUE))
   {

ExecuteScript("k_pman_26a_area", OBJECT_SELF, 1002);    

   }
else {

ExecuteScript("k_pman_26a_area2", OBJECT_SELF, 1002);    
}
}

 

Would that work?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...