DeadMansFist849 Posted July 4 Share Posted July 4 OK. So, I want to make a tiny worldspace one can buy a teleport spell for similar to Lemunde's player homes, and allows one to fast travel back to Tamriel or SI. Bonus question: How do I make a place upgradeable like the vanilla player homes? Link to comment Share on other sites More sharing options...
Surilindur Posted July 4 Share Posted July 4 For teleporting, you could use a custom persistent reference (persistent so you can use it in your script, I think, without it being loaded, but I might remember wrong) in your worldspace, a magic effect script and the MoveTo function. There is a MoveTo page in the UESP mirror of the CS with with examples: https://cs.uesp.net/wiki/MoveTo For the return effect, you could maybe use another marker that gets moved to the player just before they teleport away from Tamriel, to indicate the location they should be returned to, so when the player uses the spell to return, they would be moved to that marker, instead. The GetInWorldspace or GetInCell function might be useful to check if the player needs to be returned to Tamriel or not, but you can also track it in a variable in a quest script. If you already have a mod that does what you are after, I think the best way would be to have a look at how it accomplished this, though, since there might be some details that need to be taken into consideration. If I remember correctly, the vanilla player homes use one persistent reference per upgrade, that is set as the 'enable parent' of each individual item associated with that upgrade, and that enable parent ref is disabled by default. So when the player purchases the upgrade (I forgot if the script is in the dialogue or the item that the player is given), that enable parent ref gets enabled, and all the individual furnishings that have it as their enable parent also get enabled. It is a lot of clicking in the CS to assign the parent to every single furnishing, but compared to manually listing every single ref in a script, it is probably the easier option. There should also be other ways via scripting, but for a simple furniture upgrades those are probably an overkill. Hopefully that helps a bit! Maybe someone else has more ideas. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted July 6 Share Posted July 6 (edited) You should better use disabled rats as teleport markers since they work very well as mobile markers too. To make upgradable homes you need to place initially disabled objects and enable them through a script when the player buys the upgrade order for example. To prevent the player from selling back the upgrade orders you can script them to add a second object and script the second object to remove the first and enable the furnitures. Edited July 7 by Oblivionaddicted Link to comment Share on other sites More sharing options...
dreamCloud Posted August 31 Share Posted August 31 (edited) Easiest way is to put in an X-MarkerHeading marker and mark it as persistent and give it a name like "ReturnHomeMarker" or something like that. Then give the player an ability or spell that when used runs a simple script attached to the spell/ability that returns this line: player.moveto ReturnHomeMarker or player.moveto 012324123 (where the number is the reference ID of your ReturnHomeMarker) or you could even just move the player into the cell without a marker. It should place you nearby your door or at the very least the cell's origin (this is also why I like to put the entrance to my interiors near the cell origin just in case of bugs). You could even make the script fancy by detecting if the player is in combat before allowing the portal and returning a message like "Cannot teleport while in combat..." if so. Second easiest way is to have a holding cell and put a door there, can even make it a magic portal door or something and then give it a teleport attachment to another door in your player home, move that door out of reach of the player but move its heading marker into the house proper so they still port inside but can't activate your door that's out of the house to get out to where you ported from (unless you want to for some reason). Then on your script call you'd move the door to the player, offset in front of them a bit, and that door becomes a "magical portal" to enter your player home. To make things clean I'd also suggest moving the door back into the holding cell location after moving through it. There is the downside of NPC's also using the door (upside if a companion NPC I guess) but you can also give yourself or any companions a key and make it require the key to move through it. Third way is to use the rats (or any other disabled creature really) as the Mark and Recall spell workaround so it acts like the Morrowind spell. Edited August 31 by dreamCloud Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted September 2 Share Posted September 2 (edited) Using a form ID in a script is THE kind of thing you should never do because the form ID's depend of the load order. Edited September 7 by Oblivionaddicted Link to comment Share on other sites More sharing options...
dreamCloud Posted September 4 Share Posted September 4 Ah true enough, forgot about that. I've never done it, just remembered that you can. Just use the refid name you've given in the field for your script (the "player.moveto ReturnHomeMarker" example I gave). Link to comment Share on other sites More sharing options...
Recommended Posts