Jump to content

How to make an item that upon interacting with it teleports you to an interior?


CinnamonMods

Recommended Posts

It's certainly possible. You would simply need to attach a script to the elevator button and use the following code. Please note my Oblivionscript is rusty as heck and there may be ways to improve on this. Importantly, I haven't tried to compile it since I don't have Oblivion installed anymore. I hope this is helpful.

 

Scriptname LGPL_ElevatorButton_OnActivateTeleportPlayer

    Copyright 2020 Reneer

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    Find a copy of the LGPL at https://www.gnu.org/licenses/licenses.html#LGPL.

Begin OnActivate
	set refVar to GetActionRef
	if (refVar.GetIsReference Player == true)
		YourDoorRef.Activate Player
	endif
End
Link to comment
Share on other sites

 

It's certainly possible. You would simply need to attach a script to the elevator button and use the following code. Please note my Oblivionscript is rusty as heck and there may be ways to improve on this. Importantly, I haven't tried to compile it since I don't have Oblivion installed anymore. I hope this is helpful.

 

Scriptname LGPL_ElevatorButton_OnActivateTeleportPlayer

    Copyright 2020 Reneer

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    Find a copy of the LGPL at https://www.gnu.org/licenses/licenses.html#LGPL.

Begin OnActivate
	set refVar to GetActionRef
	if (refVar.GetIsReference Player == true)
		refVar.MoveTo YourCellMarkerHere
	endif
End

Thank you!

 

Silly question, but where can I find my interiors cell marker or am I supposed to make one?

Link to comment
Share on other sites

Oh, actually, upon further inspection on best practices we should be activating the door for the interior cell. I've updated the script above. You should change YourDoorRef to whatever the persistent reference of the exterior door that leads to your interior cell.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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