Jump to content

Teleport Spell? Or: "Beam Me Up, Scotty"


BlueSteelRanger

Recommended Posts

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

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

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 by Oblivionaddicted
Link to comment
Share on other sites

 

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 BSRLearnTeleportHomeScript

short button

short used

begin OnActivate

Activate

if isActionRef player == 1 && used == 0

MessageBox "Bite my shiny metal ass?", "Yes", "No"

endif

end

begin menumode

set button to getbuttonpressed

if button > -1

if button == 0

; add the spell to the player's spellbook

player.addspell BSRTeleportHomeEscape

playsound SPLMysticismCast

set used to 1

endif

endif

end

 

Sorry for any wall of text. I'm figuring out how to do that Spoiler thing.

Link to comment
Share on other sites

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 BSRTeleportHomeScript
Begin ScriptEffectStart

if ( player.IsInCombat == 1 )
message "You can't teleport while fighting."
else
player.moveto BSRMarkerTeleportHome
endif

End

Edited by Oblivionaddicted
Link to comment
Share on other sites

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

 

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

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 BSRRescueMeTeleportTomeScript

short doOnce
begin onactivate
if doOnce == 0
Activate
Message "Beam me up, Scotty!"
playsound SPLRestorationCast
player.addspell BSRTeleportHomeEscape
set doOnce to 1
endif

end"

 

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 BSRTeleportHomeScript

Begin ScriptEffectStart

if ( player.IsInCombat == 1 )
message "You can't teleport while fighting."
else
player.moveto BSRMarkerteleportHomeRef
endif

End"

 

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...