rlbond86 Posted February 17, 2012 Share Posted February 17, 2012 I want to make a sort of "common basement" which all of the houses have. That is, every house has a door to a basement which is identical, but there is only one door in the basement which leads back to the last house you entered from. I am trying to look at some way in papyrus of changing a door's teleport destination but the references on the internet are terrible! Can anyone help me? Link to comment Share on other sites More sharing options...
nosisab Posted February 17, 2012 Share Posted February 17, 2012 I want to make a sort of "common basement" which all of the houses have. That is, every house has a door to a basement which is identical, but there is only one door in the basement which leads back to the last house you entered from. I am trying to look at some way in papyrus of changing a door's teleport destination but the references on the internet are terrible! Can anyone help me?Don't know if it is possible in CK directly but you could enable selectively different doors depending where to go. Link to comment Share on other sites More sharing options...
kromey Posted February 17, 2012 Share Posted February 17, 2012 Neat idea, I like it more than the similar common basement mod with a bunch of doors... The way I'd approach it this:In your basement, create a distinct door leading back to each of the player houses, all in the exact same place (i.e. occupy the exact same location in 3D space -- same x, y, and z). Then, set all of them to "initially disabled". (Easy way to do this: Make one door, get it all set up properly, and then duplicate it however many times until you have enough doors; then just modify the FormIDs and destinations of each one.) Next, each door you add leading into the basement from a player house gets a new script -- it will enable the relevant return door. Finally, add a script to each of the basement's return doors that disables that door after the player's gone. (May take some trial-and-error to figure this part out, so that you don't disable the door when the player tries to use it...) Alternatively, have the entrance door's script disable all the other doors as you enter -- that way, any player that uses the "coc" console command can still get out. So you're not changing the destination of the door per se (which I don't think Papyrus can do anyway), you're just using several different doors and selectively enabling the one door you need. Link to comment Share on other sites More sharing options...
3ncryptabl3 Posted February 17, 2012 Share Posted February 17, 2012 (edited) I don't know much scripting but there must be a way to know to which basement door of which house the player went through. Maybe attach a script to each basement door so when the door is used it sets the variable 'used' in it's script so when the player goes back out the script checks for a 'used' variable, if breezehome door has 'used' in the variable , port player to breezehome marker else if proudspire marker has 'used' in the variable, port player to proudspire etc. When the player lands [or maybe with a trigger] it sets the door to 'free' resetting it. Edited February 17, 2012 by 3ncryptabl3 Link to comment Share on other sites More sharing options...
KOFFEYKID Posted February 17, 2012 Share Posted February 17, 2012 So to preface this: I dont know how the CK handles scripting. Maybe this will work. Set up a script attached to the entrance to the basement door at each home. The script would then trigger all doors in the basement to be "disabled" excepting the door which leads back into the home you just entered from. So for example, you have 3 Doors, Proudspire Manor, Breezehome and Hjierem (sp?). Walk into basement from Breezehome, script triggers and disables basement doors exiting into Proudspire Manor, Hjierem and Enables exit back to Breezehome. Link to comment Share on other sites More sharing options...
galelyan Posted February 17, 2012 Share Posted February 17, 2012 when you create a teleport type door, you're able to set what cell they go to. but in addition to picking the cell, you're able to select a reference (another door) within that cell. so unless you actually want a single door that randomly teleports you to one of multiple locations, then you can just add multiple doors to your custom built room and then make them reference doors you add yourself to other pre-existing areas. Link to comment Share on other sites More sharing options...
rlbond86 Posted February 17, 2012 Author Share Posted February 17, 2012 Neat idea, I like it more than the similar common basement mod with a bunch of doors...The way I'd approach it this:In your basement, create a distinct door leading back to each of the player houses, all in the exact same place (i.e. occupy the exact same location in 3D space -- same x, y, and z). Then, set all of them to "initially disabled". (Easy way to do this: Make one door, get it all set up properly, and then duplicate it however many times until you have enough doors; then just modify the FormIDs and destinations of each one.)Next, each door you add leading into the basement from a player house gets a new script -- it will enable the relevant return door.Finally, add a script to each of the basement's return doors that disables that door after the player's gone. (May take some trial-and-error to figure this part out, so that you don't disable the door when the player tries to use it...) Alternatively, have the entrance door's script disable all the other doors as you enter -- that way, any player that uses the "coc" console command can still get out.So you're not changing the destination of the door per se (which I don't think Papyrus can do anyway), you're just using several different doors and selectively enabling the one door you need. Is there a way to create an ObjectReference with an ID number for the door? Link to comment Share on other sites More sharing options...
kromey Posted February 17, 2012 Share Posted February 17, 2012 (edited) Is there a way to create an ObjectReference with an ID number for the door?When you place the door, that's exactly what you're doing -- creating an ObjectReference, and the FormID you make for it you can then use in your scripts. For example, let's say you start small and are adding your basement just to Breezehome and Proudspire for now (you can easily expand this later to include the other homes). You place a door leading into your basement in each of the homes, and then label them (i.e. set their FormID to) BasementEntranceBreezehome and BasementEntranceProudspire. You then create two doors, each leading to one of the two houses, in your basement, both sitting in exactly the same place (i.e. perfectly and completely overlapping each other), and label those BasementExitBreezehome and BasementExitProudspire. Then you attach a script including something like the following to the Breezehome door: ObjectReference property BasementExitBreezehome auto ObjectReference property BasementExitProudspire auto Event OnActivate(ObjectReference akActionRef) BasementExitProudspire.Disable() BasementExitBreezehome.Enable() EndEvent (NOTE: I'm no Papyrus expert, and I'm doing this primarily from memory; there's probably errors in this code, and it is incomplete (lacks the script name line at the start, for example), but it should get you moving in the right direction. Just consider this Papyrus-like pseudocode, and go from there.) No scripting need be done inside the basement -- the entrance doors handle all the enabling/disabling for you. As you expand on this and add the other doors in, you'll of course have to add more Disable() lines (and more properties -- can't forget those!) to each script. You can probably centralize that stuff (and really, you should...), something like creating a new script that does all the disabling, and then enables one door based on a property you set when assigning it to the entrance door, putting all the logic into one place for much easier maintenance, but unfortunately that's beyond my current level of Papyrus skill. Edited February 17, 2012 by kromey Link to comment Share on other sites More sharing options...
rlbond86 Posted February 18, 2012 Author Share Posted February 18, 2012 (edited) and then label them (i.e. set their FormID to) BasementEntranceBreezehome and BasementEntranceProudspire Do you mean their editor ID? The FormID seems to be a fixed 8-digit hex number. Edited February 18, 2012 by rlbond86 Link to comment Share on other sites More sharing options...
kromey Posted February 18, 2012 Share Posted February 18, 2012 Er, yeah, editor ID -- sorry, I always call that FormID for some reason... o_O Link to comment Share on other sites More sharing options...
Recommended Posts