Jump to content

Secret Doors


bauerda

Recommended Posts

Does anyone know how to make the Narrow2roomSecretDoor to open using an activator like a RFSwitchLevel01? I've tried to duplicate the ones in the game, but can't seem to get the door to open. Any help on this would be nice.
Link to comment
Share on other sites

Does anyone know how to make the Narrow2roomSecretDoor to open using an activator like a RFSwitchLevel01? I've tried to duplicate the ones in the game, but can't seem to get the door to open. Any help on this would be nice.

this code is on the lewyain lever in the private area.

The secret black is a mask to prevent you from seeing the area on you map before you find the secret entrance. though it is commented out in this instance and is not used.

the playgroup foward is initializing animation.

In this situation there is a small script on the door with the short open variable. That is what they are setting when they use "set LeyawiinCastleSecretDoor01.open to 1"

The LeyawiinCastleSecretDoor01 is the unique reference on the door. See here:

 

begin onActivate

if LeyawiinCastleSecretDoor01.open == 0
;AnvilSecretBlack01.disable
	playgroup forward 1
	LeyawiinCastleSecretDoor01.playgroup forward 1
	set LeyawiinCastleSecretDoor01.open to 1
else
	playgroup backward 1
	LeyawiinCastleSecretDoor01.playgroup backward 1
	set LeyawiinCastleSecretDoor01.open to 0
endif

end

the backward is the closing animation. all this plays out when you flip the switch.

 

To use this rename the unique reference of LeyawiinCastleSecretDoor01 to whatever you want and call that in the script ie:

 

begin onActivate

if mycellsSecretDoor01.open == 0
;AnvilSecretBlack01.disable
	playgroup forward 1
	mycellsSecretDoor01.playgroup forward 1
	set mycellsSecretDoor01.open to 1
else
	playgroup backward 1
	mycellsSecretDoor01.playgroup backward 1
	set mycellsSecretDoor01.open to 0
endif

end

hope this helps

 

also do not forget to flag your door a persistent reference or it will be unable to execute.

Link to comment
Share on other sites

While generally good advice, is probably not the best way to do it. Most of the activator based doors and switches have scripting to work with a parented reference. By using parenting, a single set of doors, switches, and scripts can be used in hundreds of different locations without any one switch interfering with another.

 

http://cs.elderscrolls.com/constwiki/index.php/GetParentRef

 

Meaning that you can probably make use of the existing references and scripts, and just set the door as the parent of the switch in order for this to work. Most cases like this do not get any benefit from any sort of special scripting.

Link to comment
Share on other sites

While generally good advice, is probably not the best way to do it. Most of the activator based doors and switches have scripting to work with a parented reference. By using parenting, a single set of doors, switches, and scripts can be used in hundreds of different locations without any one switch interfering with another.

 

http://cs.elderscrolls.com/constwiki/index.php/GetParentRef

 

Meaning that you can probably make use of the existing references and scripts, and just set the door as the parent of the switch in order for this to work. Most cases like this do not get any benefit from any sort of special scripting.

 

Im just curious, because I learn by going over existing scripts. If it is not needed why did they do it that way? If i recall correctly though, the castle secret entrance would work off of linking. I had to use scripting to make it work. Howver vangrant0 is alot more knowledgable than I am and I am prone to mistakes.

Link to comment
Share on other sites

While generally good advice, is probably not the best way to do it. Most of the activator based doors and switches have scripting to work with a parented reference. By using parenting, a single set of doors, switches, and scripts can be used in hundreds of different locations without any one switch interfering with another.

 

http://cs.elderscrolls.com/constwiki/index.php/GetParentRef

 

Meaning that you can probably make use of the existing references and scripts, and just set the door as the parent of the switch in order for this to work. Most cases like this do not get any benefit from any sort of special scripting.

 

Im just curious, because I learn by going over existing scripts. If it is not needed why did they do it that way? If i recall correctly though, the castle secret entrance would work off of linking. I had to use scripting to make it work. Howver vangrant0 is alot more knowledgable than I am and I am prone to mistakes.

I believe that in that particular case the specific references are used because the opening and closing of the door is related to quest activities. I apologize, I didn't look at those specific activators before posting. Those activators appear to have scripts designed for that specific instance instead of a more general usage. I believe that you can the the desired effect by just using the scripts attached to the moving rock secret thing from the caves since those ones are designed for more generic usage, and will work with parenting. The related switches however should be generic (didn't look at those either), but if not, you can probably attach any other generic activate switch script.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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