Jump to content

Photo

Creating a ring or spell to teleport PC home

scripting item ring spell teleport teleporting pc player character player home home

  • Please log in to reply
2 replies to this topic

#1
Eluwil

Eluwil

    Enthusiast

  • Members
  • PipPip
  • 138 posts

I want to create a player home with a ring or spell that will teleport you there when you use it. I could make a local script and attach it to the ring, this won't be very difficult to do but then the PC will continiously have an extra active script when carrying the ring around. This seems like a bad idea perfomance wise but perhaps this isn't much of an issue anymore in 2022?

 

I figured it would be easier to add a spell to the PC and have the script activate when you cast the spell but I don't know if that's possible without MWSE.

 

Should I create the ring with the local script or can I make a spell?



#2
FIMzzZzz

FIMzzZzz

    Enthusiast

  • Members
  • PipPip
  • 207 posts

[disclaimer] all i say is based on speculation and not knowledge. xP [/disclaimer]

 

in my mod i have several amulets/rings that can teleport, and i think, not an issue in 2022 anymore, applies here. we had script based graphic herbalism over a decade ago so what is 1 script xD

 

i just had a look at the scripts i used and throw a question in here.

 

would it make sense to add this on the first lines?

if ( OnPCEquip == 0 )
	return
endif

or doesn't it make a difference when it stops here anyway?

if ( OnPCEquip == 1 )

the spell option i don't think is possible without MWSE. maybe with a global script, but then you have a script running as well and then you can just use a script on the ring.


Edited by FIMzzZzz, 12 March 2022 - 02:42 am.


#3
Eluwil

Eluwil

    Enthusiast

  • Members
  • PipPip
  • 138 posts

Thank you for the Reply, I finished the script and attached it to the ring, everything is working as it should!

I based this script on one I found in "Morrowind Scripting for Dummies version 9".

 

begin "scriptname"

short OnPCEquip

if ( MenuMode == 1)
    return
endif

if ( OnPCEquip == 1)
    Player->PositionCell, -3, 194, -265, 90, "Balmora, Player Home"
    set OnPCEquip to 0
endif

End


Edited by Eluwil, 23 March 2022 - 01:13 pm.






Also tagged with one or more of these keywords: scripting, item, ring, spell, teleport, teleporting, pc, player character, player home, home

IPB skins by Skinbox
Page loaded in: 0.321 seconds