Kraeten Posted July 8, 2012 Share Posted July 8, 2012 I have a question concerning guard NPC's; it's a little complicated though, so please bear with me. I'd like to add guards to my player home, but I want their presence to be dependent on the player's choice. Ideally, the home would would only have guards if the player brought a specific journal to the Jarl. How would I go about doing this? Assuming this is even possible in the first place. :sweat: Link to comment Share on other sites More sharing options...
littleork Posted July 8, 2012 Share Posted July 8, 2012 Well you would put them into your house, and set them as initialy disabled in the reference box, and on the quest stage in which you give the journal to the jarl,, you would put the code to enable them(you will probably need to create an alias for each of the guards). I would give you the exact code but steam is being an *ss right now and dont let me open my mod in which I did the same thing. Link to comment Share on other sites More sharing options...
Kraeten Posted July 8, 2012 Author Share Posted July 8, 2012 Well you would put them into your house, and set them as initialy disabled in the reference box, and on the quest stage in which you give the journal to the jarl,, you would put the code to enable them(you will probably need to create an alias for each of the guards). I would give you the exact code but steam is being an *ss right now and dont let me open my mod in which I did the same thing. Thanks for the response, now I roughly know where to begin. :woot: Link to comment Share on other sites More sharing options...
Kraeten Posted July 11, 2012 Author Share Posted July 11, 2012 I'm still having some trouble. Is there a tutorial that follows a similar topic on the web? Link to comment Share on other sites More sharing options...
littleork Posted July 12, 2012 Share Posted July 12, 2012 I dont know if there is a tutorial but I helped myself by looking at the quest dark brotherhood forever, they pretty much do what you want to do with their targets, just look at the quest stage and the good code should be there. Feel free to pm if you need more help. Link to comment Share on other sites More sharing options...
Kraeten Posted July 12, 2012 Author Share Posted July 12, 2012 I dont know if there is a tutorial but I helped myself by looking at the quest dark brotherhood forever, they pretty much do what you want to do with their targets, just look at the quest stage and the good code should be there. Feel free to pm if you need more help. Thanks, I'll take a look at that quest later this evening. Link to comment Share on other sites More sharing options...
gasti89 Posted July 12, 2012 Share Posted July 12, 2012 You can either put the guards directly in your house and set the as "initially disabled", or you can put them in the Jarl's castle, then give them a conditioned package that will start when you give the journal to the Jarl. For the 1st case: - put a number of guards in the house and set all of them to "initially disabled" - put an xMarker somewhere in the house, and set it too as "initially disabled" - go back to each guard, find the "enable parent" tab. Create a new one and select the xMarker. Do it with all the guards. Now, enabling the xMarker will enable all the guards. - Create the journal you want. - Set the journal as an alias in the quest in wich you talk to the Jarl to give him this journal. - Put a new script on the journal alias: ObjectReference property EnableMarker auto ObjectReference property theJarl auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if akNewContainer == theJarl && akOldContainer == Game.GetPlayer() EnableMarker.Enable() endif endEvent - compile, exit, double click on the script, select the 2 properties and select the correct object to point at in the dropdown. - Now go into the last dialogue with the Jarl (the one in wich you actually give him the journal), and call a SetStage() in the fragment. - Now go into the stage you just called. In the fragment write Alias_Jarl.GetReference().Additem(Alias_Journal.GetReference()) if the Jarl is an alias. If not, click on properties, add a new ObjectReference property and call it Jarl. Fill it with the Jarl Reference, and use this script instead. Jarl.Additem(Alias_Journal.GetReference() Link to comment Share on other sites More sharing options...
Kraeten Posted July 12, 2012 Author Share Posted July 12, 2012 That'll help a bunch gasti89, thank you so much for the assistance! Link to comment Share on other sites More sharing options...
Recommended Posts