BlueSteelRanger Posted April 11, 2023 Share Posted April 11, 2023 Salutations again, all! I'm progressing nicely with my mod -- even learned how to make some spell tomes for some goodies in said mod! Now though, I'd like to try and create a Teleport spell, something along the lines of the one in the lovely Frostcrag Reborn mod, or LAME mod. A spell that allows you to teleport yourself back to the home/s I'm creating. Is it possible to do that, and if so, how might I best go about it? I have tried a Tome-style thing (Open a book, bam, learn the spell) but it doesn't seem to stick. I have a script for it but I confess, it may be off. I'm just not sure where it's off.It seems to me that teleporting works a little differently than your typical Oblivion spell. Regards,--BSR Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted April 11, 2023 Share Posted April 11, 2023 (edited) Basically you need to put a marker somewhere and set the spell to move the player to the marker like I do in More generous factions with my spells to teleport between Cyrodiil and the paradise. Do you want example scripts? Edited April 11, 2023 by Oblivionaddicted Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 12, 2023 Author Share Posted April 12, 2023 Basically you need to put a marker somewhere and set the spell to move the player to the marker like I do in More generous factions with my spells to teleport between Cyrodiil and the paradise. Oooh, what's your mod? I'm curious and love trying out mods! My apologies for the slow-ish response here. Time zones (Jeez, jet lag still has me in its grip months on after a move). I would love to peruse some examples. I have an XMarker for the teleport but it doesn't seem to want to take the spell. If you like, here is the script I have. scn BSRLearnTeleportHomeScriptshort buttonshort usedbegin OnActivateActivateif isActionRef player == 1 && used == 0 MessageBox "Bite my shiny metal ass?", "Yes", "No"endifendbegin menumodeset button to getbuttonpressedif button > -1 if button == 0 ; add the spell to the player's spellbook player.addspell BSRTeleportHomeEscape playsound SPLMysticismCast set used to 1 endifendifend Sorry for any wall of text. I'm figuring out how to do that Spoiler thing. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted April 12, 2023 Share Posted April 12, 2023 (edited) No problem. You do well to start your editor ID's with letters, it contributes to the stability.They will be even less likely to conflict with other mods if you combie your nickname, a short description of the object and the acronym of the mod. Put a Teleport marker in your destination, give it a cell reference, tick the persistent reference box. The script of your teleport spell should look like this: ScriptName BSRTeleportHomeScriptBegin ScriptEffectStart if ( player.IsInCombat == 1 ) message "You can't teleport while fighting." else player.moveto BSRMarkerTeleportHome endifEnd Edited April 14, 2023 by Oblivionaddicted Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 13, 2023 Author Share Posted April 13, 2023 Ohh. Hmm. Is it possible to tweak the "in combat" part? I know, slightly cheaty, LOL! It's partially intended as a last-ditch to save one's tail if an enemy is too strong. And one of my intended enemies is planned to be kind of tough. So. Xmarker = persistent reference.You said a "Teleport marker", is that its own thing? (I'm in the Kit now, checking things out, actually. You all on Nexus are really great with your descriptions for my blind self). Should the marker be anywhere special (i.e. NOT in an exterior location, interior preferred or something like that)? Link to comment Share on other sites More sharing options...
RomanR Posted April 13, 2023 Share Posted April 13, 2023 You said a "Teleport marker", is that its own thing? You can change any reference's ID to your liking. So BSRMarkerteleportHome marker can still have XMarker defined as its base object. Only bear in mind that new ID must be unique. Otherwise it's same static object as others, just Bethesda made XMarker visible in Construction Set, but invisible in game. And yes, just remove the condition checking player's combat status and teleport will work always. Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 14, 2023 Author Share Posted April 14, 2023 Ah, okay. I'm going to try implementing this. Thanks! Let's see how this goes. Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 14, 2023 Author Share Posted April 14, 2023 Hmmmm. Update: The spell didn't take and my XMarker object actually shows up in-game. The following scripts are being used for this.BOOK/TOME script"scn BSRRescueMeTeleportTomeScriptshort doOncebegin onactivateif doOnce == 0ActivateMessage "Beam me up, Scotty!"playsound SPLRestorationCastplayer.addspell BSRTeleportHomeEscapeset doOnce to 1endifend" This is an Object script on a book intended to be read in-game. It also offers a Skill point in Mysticism. (This can be removed if it interferes with the spell, honestly). SPELL script"ScriptName BSRTeleportHomeScriptBegin ScriptEffectStart if ( player.IsInCombat == 1 ) message "You can't teleport while fighting." else player.moveto BSRMarkerteleportHomeRef endifEnd" This is a Magic Effect script, intended to be the spell itself.Don't mind the "Beam me up, Scotty" bit. I have placeholder-ish text, as I'm drafting the actual story-stuff. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted April 14, 2023 Share Posted April 14, 2023 A XMarkerHeading is more convenient than a XMarker because it directly shows the orientation of the teleported character. The XMarkers are normally invisible in-game, you must have a mod that modifies their mesh or associates them to another mesh. Did you give your marker the reference you wrote in your script? Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 14, 2023 Author Share Posted April 14, 2023 I don't have any mods that change the appearance of XMarkers, no. I tend to be a bit weird about those and other markers/essential bits that seem to get weird if they're messed with too much. Yep. "BSRMarkerteleportHomeRef" is the RefID and "BSRMarkerteleportHome" is its name. Hmm. I'll have to look for that... Link to comment Share on other sites More sharing options...
Recommended Posts