Jump to content

Teleport Item


Myst42

Recommended Posts

Hi

I want to make a teleport item. Click on inventory, cell teleport.

 

Deconstructing stuff, i learnt that this can be done by adding a teleport spell.

Then a script that uses rats as markers, puts one where the player is before teleporting, then moves player to the one in the target place and can move the player to the first rat if he/she already is at the destination place.

 

But that is only the spell

 

I need a way to bind that spell to an inventory item

But I can't script at all.

Help anyone?

A copied script from another mod, a kind sould that makes the script for me, hell even one of those nasty scripting tutorials, as long as it actually contains the info I need, would be welcome. Thks

 

---

I know I wrote this on another place by mistake but I dont think pple will notice it there.

If someone needs to delete or block a thread, please do that to the other one, thanks.

Link to comment

I'm not sure I'm following you.

 

You want an item, that links to a spell, that moves the player around according to his wishes? A set point\go to point\return from point kind of affair?

Well, why use a spell at all?

 

Create a misc item with an OnEquip script that brings up a menu. The menu will have...

Set Point [1..X], Move to Point [1..X] and return to last location (in case it's needed, you can add 'Next Page\Previous Page' buttons as required. Alternatively, create multiple misc items, each with a theme - Town Teleport, City Teleport, Dungeon Teleport etc).

 

For this, you will need X+1 invisible objects that each have their unique, persistent reference. What you do is use the moveto player command on the "last location" one, then move the player to their destination.

You may wish to create a fallback check (if the marker hasn't been set, don't move the "last location" marker).

 

Remember to move the player a bit up on the Z axis when you move them, to avoid clipping into things and possibly falling through the floor. Not too much, though - you don't want the player to start taking falling damage!

Link to comment

I want whatever works to have an item, that on activation teleports the player to a particular specific cell of my choosing and design, call it a "pocket dimension"

And on activation again, it returns the player to the world.

 

Now according to the mods I've seen, (some pocket dimension houses and certain photo studio mod) they were doing it in 2 steps, teleport spell and then cast spell on item equip or something like it.

I take it that's because the script I copied for the teleport spell wouldnt let me save it as an object script

 

This is the script for the teleport part I currently have (not tested yet)

 

 

Begin ScriptEffectStart
    if (AATeleportCube == 0)    
        CubeMarkerRatB.MoveTo player
    endif
End

Begin ScriptEffectFinish
    playSound DRSOblivionGateOpen
    if (AATeleportCube == 0)    
        set AATeleportCube to 1        
        player.MoveTo CubeMarkerRatA
        
    else
        set AATeleportCube to 0        
        player.MoveTo CubeMarkerRatB
    endif
End 

 

 

Other than that, it works with a "global" and 2 rats marked as persistent references named A and B
 

But again I tell you, my problem is I can't script at all

What I can do, is copy rudimentary coding such as this, and try to put it together so that it makes sense.

So I'll need either a mod that has what I need in it's scripts, a tutorial containing exactly the explanations needed, or a kind sould that helps in step by step... or does the thing out of the goodness of their hearts for me... which based on exp I doubt, but still doesnt hurt to ask.

Link to comment

Alright, so what you're doing is even simpler than I thought. If I hadn't deleted my Oblivion copy, I would've done this for you in less than 5 minutes.

 

I'll try to give you a script that's as close to functional as I can. Bear in mind the syntax might be a little off since I haven't used the CSE in months.

 

 

scn VaelPortalScriptForMyst42

int PortalSet = 0
int PortalSetAtCheck = 0


Begin OnEquip

set PortalSetAtCheck to PortalSet

If (PortalSet == 0)
PersistentRef1.moveto Player
set PortalSet to 1
Player.moveto PersistentRef2
endif

if ((PortalSet == 1)&&(PortalSetAtCheck == 1))
set PortalSet to 0
Player.moveto PersistentRef1
endif

end

 

 

 

The script has some potential redundancy, as I don't really remember certain attributes of Oblivion coding. However, it *should* be functional.

 

It relies on:

-Two objects with the 'Persistent Reference' checkbox ticked, the first one with PersistentRef1 editor name and the second with 'PersistentRef2' editor name.

It should be attached to:

-A misc item.

It will:

-Teleport 'PersistentRef1' TO THE PLAYER when the misc item is clicked the first time.

-Teleport the player TO 'PersistentRef2' when the misc item is clicked the first time.

-Teleport the player TO 'PersistentRef1' when the misc item is clicked the second time.

 

I would've listed all of that on the script itself, but I forgot the comment syntax.

 

Let me know if you need any further assistance, or if the script doesn't compile or malfunctions in any way.

Feel free to switch the reference names with the ones you're using, though I am extremely curious what magical rodent adventure you're creating that it necessitates magical portal rats.

Link to comment

Ugh... Thanks for the attempt. That was so close...

I feel like it wants to work but it's not there yet...

 

Using the item causes cell loading screen and it all goes well... until it cant load the cell and gets CTD

It's not the cell. Cell is just blank and getting there by console command works just fine

Tried putting markers in another cell too

Tried changing the rats by X markers

It's either CTD or horrible blinking loop and you loose your lower body part in clipping ground

I dont get it... the script makes logic... even for someone who doesn't understand scripts like me.

 

I was kinda hoping this would be less trouble, but as usual...

At least the item activation works.

 

I'll leave the file in case it's of any use

There is a pearl just near where you pop up in the testinghall when you coc testinghall with console

 

BTW the mod idea is simple.

You can have this item as a place to store gear

I still havent done nor the item nor the cell, so for now it's just a pearl and an empty cellar, but it's supposed to be something interesting and some nice room. I was gonna give this to a companion and use it to store her gear, but the idea could be of use to some other people too maybe.

 

 

Tesseract.esp

Link to comment

Alright... Try this code:

 

 

scn VaelPortalScriptForMyst42

int PortalSet = 0
int PortalSetAtCheck = 0


Begin OnEquip

set PortalSetAtCheck to PortalSet

If ((PortalSet == 0)&&(PortalSetAtCheck == 0))
PersistentRef1.moveto Player
set PortalSet to 1
endif

If ((PortalSet == 1)&&(PortalSetAtCheck == 1))
set PortalSet to 2
Player.moveto PersistentRef2
endif

if ((PortalSet == 2)&&(PortalSetAtCheck == 2))
set PortalSet to 0
Player.moveto PersistentRef1
endif

end

 

 

All I did was split up moving 'PersistantRef1' and moving the player. It shouldn't matter but I cannot think of anything else that could possibly be causing issues.

You will have to activate the item twice to get teleported (best idea is to hotkey it and use it from the game world - but do try to give it at least half a second's delay to move the ref).

An alternative was to force a delay between moving the ref and moving the player but - alas - I do not remember the wait syntax.

Link to comment

Closer...

It "slowed down" the defect so now it's not fatal and now It shows what's happening

 

For some reason, it refuses to move to the destination marker

Using the item again teleports back to the testinghall (where the marker was left) again and again...

 

If left alone without the "move marker to player" function first, I managed to get to the room, but ofc, there's no way to return then.

And yes, I double and triple checked many times that the script is supposed to be moving the marking marker and not the destination one

 

Maybe that's why they do it by steps?

So that they can use something to place the marker and something else to teleport the player?

I was thinking the cast spell on self maybe and I can attach the script to a spell? But what's the line? "cast Insertspellname on player"?

Looks like a long shot still...

Link to comment

Ok. Managed to make it work.

Had to try a different approach though.

Used another mod where the thing does work and tweaked the scripts and stuff to change names and remove the unnecessary content...

It has an exit menu though.

Also a spell and an item...

Damn evil scripts...

But it works now so i'll take it.

Thanks for the help anyway still.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use