Jump to content

Auto Load Cave Doors


senterpat

Recommended Posts

Been pondering this for awhile, would like to see a mod that scripts cave doors to be entered automatically when you are near. Also any creatures as well, which is the part I can't think of how to do. Any ideas on how to accomplish this? Other then manually setting up triggers at each cave door, as that would need patches for awop and stuff.

Link to comment
Share on other sites

I did make this exact thing recently. File must have been lost when I nuked my last installation though.

 

I did it the way you describe, with triggers placed at each cave entrance. I didn't include creatures though. I don't know (don't care) if this would have conflicted with AWOP (don't use it.)

 

It's boring, tedious work, but thankfully there aren't extremely many caves in the game. Takes a couple of hours maybe.

Link to comment
Share on other sites

Ya would like for it to work with caves added by mods and the like. As for creatures it just doesn't make sense to me that they can't chase me out of cave. The bear trap may be the key.. Since it can just be dropped into the game world and any actor can set it off.

 

 

Edit: Checked out the bear trap in nifskope, there's a trigger attached to it, gonna try mashing it with the cave door mesh and scaling it up when I get up should be easy to modify the bear traps script to activate it if the actor hits the trigger. Still not sure if it will work with creatures, since "activate" will treat it normally and they can't normally open doors. Anyone know how the door links are handled? Could I use moveto linkedref maybe?

 

Double Edit: Just saw the GetLinkedDoor Function added by NVSE, but I think it just returns the actual door it's linked to, not the marker, anyone know if it's possible to reference the marker? That's really all I need to make this work.s

Link to comment
Share on other sites

So did some testing, and I can't quite figure it out. For testing I just swapped the cave door mesh for the bear trap mesh. I edited the bear trap script minimally to test it, leaving the majority unchanged, the only part I changed was this:

begin onTriggerEnter


; find out who triggered the trap
set trapVictim to getActionRef


if trapVictim.hasPerk lightStep == 0


if disarmed == 0
set disarmed to 1
set rewardXPOnce01 to 1
playgroup Forward 1         ;trap close animation                   


;drop the target's health by 50 and display it
trapVictim.DamageAV health 45
trapVictim.do 45 ;or damage object if not an actor
;random for which leg to disable
short legToDisable
set legToDisable to 1 + 0.02 * GetRandompercent 


if (legToDisable == 1)
trapVictim.damageAV LeftMobilityCondition 50
elseif (legToDisable == 2)
trapVictim.damageAV RightMobilityCondition 50
endif


trapVictim.say Hit


endif


endif 

to this:

begin onTriggerEnter


set trapVictim to getActionRef


if disarmed == 0
set disarmed to 1
set rewardXPOnce01 to 1
playgroup Forward 1         ;trap close animation                   




trapVictim.Activate Myself


endif


endif 

Can't seem to get it to activate tho. The animation and sound for the bear trap plays fine, and when i use the console to activate the bear trap door it teleports me as it should. Any ideas why this isn't working?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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