MasterWaffle Posted March 8, 2008 Share Posted March 8, 2008 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 More sharing options...
DarthJebus05 Posted March 8, 2008 Share Posted March 8, 2008 Well, what I would do is make a simple spawn script and attach it to one of the last dialog options in Dustil's last dialog. Link to comment Share on other sites More sharing options...
MasterWaffle Posted March 8, 2008 Author Share Posted March 8, 2008 Would that work to spawn someone on a completely different planet, awhile after the fact? I have an on entry script already prepared (that works), but would like it to fire only if Mission's sidequest has been completed. Link to comment Share on other sites More sharing options...
Stream Posted March 8, 2008 Share Posted March 8, 2008 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 More sharing options...
MasterWaffle Posted March 8, 2008 Author Share Posted March 8, 2008 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 More sharing options...
Stream Posted March 8, 2008 Share Posted March 8, 2008 Yeah that should work, it would be best if you then changed the journal entry to a different state if possible so it would fire again. --Stream Link to comment Share on other sites More sharing options...
MasterWaffle Posted March 8, 2008 Author Share Posted March 8, 2008 What do you mean by different state? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.