Jump to content

Trap Door Help.


Darthlvlaul

Recommended Posts

Im trying to use the Ungrdtraphingedoor In basement sections,(Im a beginner so bare with me)as an interior door that opens without the load screen.Im trying to use the door on a underground transition to fort ruin piece,but when I test my mod InGame the door doesn't open when I activate it.I have made the door a Persistent Ref,and it still wont open what am I doing wrong?

 

Is this door only for teleporting?Well if it is thats lame because it has "Hinge" in the name lol?...

Link to comment
Share on other sites

Ok I went with the benirus door instead,I had to write my own small mod script to get the door working properly(Not bad for a beginner huh?),and so I don't screw up the anvil quest.I tested Ingame and it seems to work great for what I want,But I would still love to hear if anyone gets the other door working...
Link to comment
Share on other sites

Thanx well I mostly just like the look of that particular door kuz it looks like a secret wall/door lol but I want this for a small hidden passage way to a house I made,it's a very small hidden passage at the back of my house,with a few secret doors,I made it so it's the only way in to my house the front door is a fake it's locked it needs a key and there well is no key LOL..But anyways the passage is so small loading screens would be unnecessary...
Link to comment
Share on other sites

If you can't find somebody to make an animated door for you (there are no vanilla animated trap doors), then there is a stopgap that may be lame, but is better than nothing.

 

Create two trap doors, one open and one closed. They both have to be persistant references. The Open one should be Initially Disabled. You can then apply the same script to both doors.

 

PlaySound DSRLatchOpen01

 

IF GetDisabled <referenceYourDisabledDoor> == 1

<referenceYourDisabledDoor>.Enable

<referenceYourEnabledDoor>.Disable

ELSE

<referenceYourDisabledDoor>.Disable

<referenceYourEnabledDoor>.Enable

ENDIF

Link to comment
Share on other sites

Hey good idea thanx I might try that..Wait,you actually have to animate some doors yourself?Im new to modding oblivion,so why is it when I use the benirus door and mod the script a lil bit it works without having to animate anything? Can anybody find where they used the undrgtraphingedoor ingame I would love to see how the devs used that door...
Link to comment
Share on other sites

Yes, some meshes have animations in them. Animating a door would not be difficult... if you knew how to do it, which I don't.

 

Animated doors are hard-coded so you don't need to script them, but just about everything else that is animated needs to be scripted, like secret doors.

 

To find out where something is used in-game, right click on it and select "Use Info". This will tell you wherever the object is used...

Link to comment
Share on other sites

Hey there guys. You can attatch the following script to an activator. Attatch the following script to it and it should work. You can leave in the annotations if you like or remove them.

 

scn XXXyourScriptNameHere


ref gate		;declares reference variable 'gate' but still needs to be difined 
ref self		;declares ref variable 'self' but still needs to be difined
short triggered		;declares variable 'triggered' and defined at 0

begin onActivate	;this starts the script when the switch is activated

set gate to getParentRef	;defines variable 'gate' as what this switch is parented to
set self to getself		;defines variable 'self' as the switch

if triggered != 1				;says if the animation is in default position (triggered is not equal to 0)
	self.playgroup forward 0			;says to play the animation on the switch
	gate.playgroup forward 0			;plays animation on the parent
	set triggered to 1				;tells us that this has been done, animations are not in default state
elseif triggered == 1				;says if that didn't work because the animations have been run
	self.playgroup backward 0			;reverses animations
	gate.playgroup backward 0
	set triggered to 0				;says that 
endif
end

 

All you need to do is attatch that script to any (unique) activator. Make both the target and the trigger persistant. That's all for a basic trigger.

 

No, not all activators have animations attatched, but you can rotate a door untill it is sideways. So you're asking, yeah but how does this help me? Or you are saying, yeah, I already know that.

 

Well then we will make a trap door that activates when you are over it. First find your door (like doors/archetecture/castleInterior/narrowSections/ SecretDoorLeyawiinPrivate. This could be a suitable alternative if scaled and rotated properly. You don't even need to attatch a script to it!

 

Then make a unique trigger for it by going to world objects/activator/misc/triggers and find one that looks the correct size. Edit the trigger's ID (make it UNIQUE) and then make the following script and attatch it:

 

 

scn XXXyourScriptnameHereXXX

ref target	

begin onTrigger player


short triggered
ref target
short triggered	



begin onTrigger player

  if triggered == 0

     set target to GetParentRef
     set triggered to 1

if triggered != 1		
	target.playgroup forward 0
	set triggered to 1
elseif triggered == 1
	target.playgroup backward 0
	set triggered to 0
endif


  endif

end


end

 

 

It works in exactly the same manner as the other script, but since the trigger is not an animated object (reference), we don't need to playgroup it forward or backward. Also they trigger "begin onTrigger player" instead of GameMode or onActivate.

 

You should now have a square brick that moves like a trap door, activated when the player passes over it (you are giong to need to get a little more advanced to make it trigger on creatures or NPC. You will need to path it then). I hope that this solves your issue. I recently went through the same thing, so all I had to do was cut and paste :biggrin:

 

 

 

best of luck and hopefully you help me someday :wink:

theuseless

Link to comment
Share on other sites

  • Recently Browsing   0 members

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