Uniquekind Posted May 10, 2012 Share Posted May 10, 2012 I am trying to find the right script/ property/condition to use to fufill a quest objective of finding a corpse to loot so that the quest marker I have assigned to him will go away once he is looted. As it is right now, looting the item off the corpse still advances the quest properly, but the marker stays over the corpse. I'm looking for something along the lines of defaultsetstageonlootMy brain is turning to jello trying to wrap my mind around questing/scripting, though the feeling of accomplishment I had the first time the quest worked from begining to end was quite satisfying! Of course this was after several hours of failure. 8) Link to comment Share on other sites More sharing options...
gasti89 Posted May 10, 2012 Share Posted May 10, 2012 The script you're looking for is DefaultSetStageOnPlayerAquire (or PlayerAquireRefAlias) Attach it to the object you loot (playeraquire) or to the alias pointing to that object (playeraquirerefalias, better imho). This script sets a particular stage when pick up the object. Then you have to go to the stage's fragment and write SetObjectiveCompleted(x) where x is your objective index Now you can mark the quest as completed if you want (remember to write Stop() in the fragment to actually make the quest finish) Or if you have another objective you can write SetObjectiveDisplayed(x) Link to comment Share on other sites More sharing options...
Uniquekind Posted May 10, 2012 Author Share Posted May 10, 2012 This would work except I am already using that script to advance to a different stage. I want to have "finding the corpse" to be an objective. The way it is working now the player is told to find someone, but the player ends up finding them dead. Upon searching the body the player discovers a note, and then is told to read the note. stage 10 find body stage 20 search body <-- need a script for that without actually looting OR to have the find body satisfied by proximity stage 30 read the note stage 40 follow instructions on note However, I needed to set this up so that if you come across this body before having this quest, it will automatically jump to the right part of the quest upon picking up the note. Looting the note thus always triggers the "read the note" objective, and I don't want several quest objectives completed stacking on top of each other from one object being looted. DefaultSetStageOnPlayerAquire is already implemented on the note to advance to 30 PlayerAquireRefAlias was not found when I typed it into the "add script" area Link to comment Share on other sites More sharing options...
gasti89 Posted May 10, 2012 Share Posted May 10, 2012 I'm a bit confused, so i'll write what i've undestood and correct me if i'm wrong: - stage 10 ---> you talked to a NPC who asks you to find someone ---> objective = find xxxxxx - stage 20 ---> you approach the objective just to find him dead ---> objective = loot xxxxx - stage 30 ---> you looted the corpse and found the note ---> objective = read the note - stage 40 ---> you've read the note instructions ---> objective = follow the note If this setting is right, then to set the stage 20 you need a trigger box: - in the cell view, select the dead body (just 1 click) - click on the "box with a T inside" in the toolbar (about in the middle of the toolbar) - this will open a window that allows you to select some objects, the selected one will be the trigger's shape (i usually use xmarker shape) - a red rectangle will appear around the NPC. Dragging the coloured arrows you can modify its size. - once done, double click on it and go to scripts. Search for a script like "default set stage TRIG specific actor" (don't remember the proper name) - now you only have to edit the properties. Since you want to make the trigger work even without knowing about the quest, don't fill the "prereqstage" property (also, you may want to mark the "run once", so this script will disable itself after the 1st time you enter it) - now when you enter the trigger, the quest will automatically update to stage 20 and display all the related stuff Link to comment Share on other sites More sharing options...
Uniquekind Posted May 11, 2012 Author Share Posted May 11, 2012 (edited) I set up a trigger box using xmarkeractivator (it was the only xmarker that appeared from the drop down menu) and sized it to fit the small room the corpse was in. I added the script DefaulSetStageTRIGSpecificActor and set it to: disable when done: truequest: my questrun once: trueprereq stage: 10 (I only want this to fire if you already have the quest)set stage: 20actor: corpse (yes it is unique) Unfortunately this didn't work. I then chose the zone it was in as the "encounter zone" to see if that would fix anything and it didn't change anything.Do I need to make a linked reference or parent? The trigger box is set on the corpse--does it have to be set to the alias of the corpse instead? I didn't see the alias as an option in the drop down menu while selecting the actor property. I appreciate all your help, and I'd like to thank you for taking the time to troubleshoot this with me. Edit: I just tried using the defaultSetStageOnEnterTrigger and set the script for it instead of the xmarkeractivator and that didn't work either. Edited May 11, 2012 by Uniquekind Link to comment Share on other sites More sharing options...
gasti89 Posted May 11, 2012 Share Posted May 11, 2012 You have to set "player" as the actor. This trigger will call the SetStage when YOU enter in it Link to comment Share on other sites More sharing options...
Uniquekind Posted May 12, 2012 Author Share Posted May 12, 2012 Tried this when I got home expecting to feel like a complete idiot, but that didn't fix it either. Doesn't really lessen the facepalm feeling though >.< I did finally get it to work using the xmarkeractivator with the defaultsetstageonenter script. Thanks again for all the help, I actually learned a good deal about simple questing through this. Link to comment Share on other sites More sharing options...
Recommended Posts