Jump to content

Scripting a door to load two different cells.


Nomad522

Recommended Posts

So I have a player home mod. I am working on adding some MCM support. One option I would like to have is for the player to have a choice between two different basements. So I need to make a pair of scripts that will set what cell the basement door loads when they are run. And then to link them to my MCM menu. I've got everything else ready to go. I really just need to see if anyone can point me in the right direction for editing the door with a script.
Link to comment
Share on other sites

If the menu thing doesn't use a global variable give it one and set it to a certain value depending upon which option is selected. Then use a simple IF check.

 

 

Event OnActivate(ObjectReference Someone)
If Someone == Game.GetPlayer()
If globalvariable.GetValueInt() == 1
;open to basement #1 stuff here
ElseIf globalvariable.GetValueInt() == 2
;open to basement #2 stuff here
EndIf
EndIf
EndEvent

 

Do note that I've never worked with doors or that MCM stuff. But that's how I'd set up the script itself...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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