aBaDmAn91 Posted February 21, 2012 Share Posted February 21, 2012 So I've removed the cobwebs and spiders (I think they respawn) in Redbelly Mine... but I want the game to remove it when I've done that quest... How should I proceed? Link to comment Share on other sites More sharing options...
kromey Posted February 21, 2012 Share Posted February 21, 2012 This is actually surprisingly easy to do. 1) Create a new "XMarker", place it somewhere convenient for you. These don't show up in-game, so it's usually most convenient to put them well outside of anything you might be working with so they don't get in the way. Take a look at Breezehome -- those XMarkers are way outside of the house! Give it a meaningful editor ID, like "SpidersAndGunkMarker" or something. 2) For every spider, cobweb, etc. that you want to "go away" at some specified time, set its "Enable Parent" to be this marker. You can either edit the object, or you can select multiple objects in the Cell View Window, then right-click and choose "Set Enable Parent". 3) Now, in your quest, when you reach the stage where you want all that stuff to "go away", you simply disable your marker -- everything connected to it will also disable. Make your marker a quest alias (of type "specific reference", pointed of course at the marker you created previously), and then in the snippet for the stage where everything's supposed to disappear, enter Alias_YourMaker.GetReference().Disable(). (Supposedly Alias_YourMarker.TryToDisable() is a shorthand for this, but it didn't work for me.) You can alternatively create a property pointing to your marker (as you would for any other script) instead of an alias, but I believe using aliases is preferred for quests. If you want to see this in action, take a look at the Breezehome interior cell; there's an XMarker for each "upgrade" you can buy from Proventus, tied to the items affected by it. You'll notice that here the markers are "Initially disable"d, as well as you'll see several objects that are tied to the marker but have the "opposite of parent" box checked -- this is because, logically, the upgrades are disabled initially, as well as there's default clutter that "goes away" when the upgrade is bought. Perhaps a cleaner example is in my mod Dovahheim; if you download that, you'll find a few XMarkers in the little pond/lake next to Robber's Gorge (IIRC, the cell is RobbersGorgeExterior04); one is initially enabled and is connected to all the bandits (plus the triggers and bear traps), the other is initially disabled and points to the Hjaalmarch guards I added. Then take a look at the quest DHQClearTheCamp (it's under the Dovahheim sub-category in Quests), and specifically at stage 50, to see how I disable the bandits and simultaneously enable the guards. Link to comment Share on other sites More sharing options...
aBaDmAn91 Posted February 21, 2012 Author Share Posted February 21, 2012 (edited) Thanks a lot, gonna check it out... because I still have problems doing this hehe :) Edited February 21, 2012 by aBaDmAn91 Link to comment Share on other sites More sharing options...
aBaDmAn91 Posted February 21, 2012 Author Share Posted February 21, 2012 (edited) I only get errors -.- I don't know how to get rid of them... Edit: compile error or something :/ Edited February 21, 2012 by aBaDmAn91 Link to comment Share on other sites More sharing options...
kromey Posted February 21, 2012 Share Posted February 21, 2012 What errors do you get? At which point do you get them -- e.g. when making the initial "enable parent" links, or when compiling the quest's Papyrus fragment, or...? It's a great feature to have, and sounds like exactly what you need here, but I'm not psychic -- I need more to go on so I can help you get it figured out. Link to comment Share on other sites More sharing options...
aBaDmAn91 Posted February 21, 2012 Author Share Posted February 21, 2012 (edited) What errors do you get? At which point do you get them -- e.g. when making the initial "enable parent" links, or when compiling the quest's Papyrus fragment, or...? It's a great feature to have, and sounds like exactly what you need here, but I'm not psychic -- I need more to go on so I can help you get it figured out.Hehe I just added it to the "Edit", but yeah I get the error when I'm compiling the quest. This is what the stage 200 looks like:(before edit btw) ;Quest DonepShorsStoneMineOpen.Value = 1if IsObjectiveDisplayed(20) == 1SetObjectiveCompleted(20,1)endifGame.GetPlayer().AddItem(pReward,1)Alias_FFSS01FilnjarAlias.GetActorRef().SetRelationshipRank(Game.GetPlayer(), 1)Stop() Edited February 21, 2012 by aBaDmAn91 Link to comment Share on other sites More sharing options...
kromey Posted February 21, 2012 Share Posted February 21, 2012 I'm confused... this is the code before you change anything? What code are you adding, and what's the gist of the error(s) you get when you do? Link to comment Share on other sites More sharing options...
aBaDmAn91 Posted February 21, 2012 Author Share Posted February 21, 2012 The thing is... that I'm not 100% sure where to add the disable script... I added it: Alias_FFSS01FilnjarAlias.GetActorRef().SetRelationshipRank(Game.GetPlayer(), 1)HereStop() But thats probably wrong. Link to comment Share on other sites More sharing options...
kromey Posted February 21, 2012 Share Posted February 21, 2012 Actually, where you add it shouldn't matter, so long as you put it before the Stop() and avoid putting it inside any conditional blocks that may not run (i.e. don't but it between if ... endif). So where you put it should be fine. What exact code are you adding, and what errors do you get (I seem to recall the error window having a handy "Copy to Clipboard" or similar button...)? Link to comment Share on other sites More sharing options...
aBaDmAn91 Posted February 21, 2012 Author Share Posted February 21, 2012 (edited) I think I've found the error lol GetReference().Disable.() When i removed that... I didn't get any errors. And yes I added it by a mistake :) Edit: It still didn't update... I'll show you what I did. ;Quest DonepShorsStoneMineOpen.Value = 1if IsObjectiveDisplayed(20) == 1SetObjectiveCompleted(20,1)endifGame.GetPlayer().AddItem(pReward,1)Alias_FFSS01FilnjarAlias.GetActorRef().SetRelationshipRank(Game.GetPlayer(), 1)Alias_SpiderAndCobweb.GetReference().Disable()Stop() Edited February 21, 2012 by aBaDmAn91 Link to comment Share on other sites More sharing options...
Recommended Posts