Jump to content

[LE] How to make a disabled object and audio appear with trigger?


Recommended Posts

What i'm wanting to do is when a player walks through a triggerbox, an audio plays of rocks falling and several boulders that are disabled (I believe this is how it's done) appear to block the way out. Can this be accomplish this way and if so, how? I'm sure you can simply connect the audio to a trigger, but how do I have the second work?

Link to comment
Share on other sites

For an in-game example and to determine how Bethesda did it, you can take a look at the wall collapse inside Helgen Keep. That instance includes camera shake, character animation and dust clouds to help minimize the sudden appearance of the rock wall.

 

However, the most simplest setup may be as follows (please note that this has not been tested):

Scriptname myTriggerBoxScript Extends ObjectReference

Sound Property myAudio Auto
ObjectReference Property myRockfall Auto

Event OnTriggerEnter(ObjectReference akActivator)
  If akActivator == Game.GetPlayer() ; did player enter
    myAudio.play(myRockfall)
    myRockfall.Enable()
  EndIf
EndEvent

Please change and adapt to your needs as necessary...

Link to comment
Share on other sites

What i'm wanting to do is when a player walks through a triggerbox, an audio plays of rocks falling and several boulders that are disabled (I believe this is how it's done) appear to block the way out. Can this be accomplish this way and if so, how? I'm sure you can simply connect the audio to a trigger, but how do I have the second work?Woul

It worked! Thank you! For anyone else doing this, connect the parts you want to use to an xmarker (object to XMarker), mark the marker as initially disabled, and make sure in the Navmesh Import Option check off inherit from base object.

Edited by wilwhitt56
Link to comment
Share on other sites

 

What i'm wanting to do is when a player walks through a triggerbox, an audio plays of rocks falling and several boulders that are disabled (I believe this is how it's done) appear to block the way out. Can this be accomplish this way and if so, how? I'm sure you can simply connect the audio to a trigger, but how do I have the second work?Woul

It worked! Thank you! For anyone else doing this, connect the parts you want to use to an xmarker (object to XMarker), mark the marker as initially disabled, and make sure in the Navmesh Import Option check off inherit from base object.

 

Is there a way to connect this to a death script? I'm wanting to make a script that, when a boss dies, collapsible rocks falls from the ceiling in the arena on certain delays ( those trap rocks used in the lean-to traps), explosions go off on a machine, and an exit pops up that the player runs through to "escape". I know it involves the Event OnDying Script, but would that work the same way as this? Connecting the object reference, sounds, effect and door?

Edited by wilwhitt56
Link to comment
Share on other sites

Pretty much. The script would extend Actor if placed directly on the actor. Or it would extend ReferenceAlias is placed on a quest alias that points to the actor. Then the OnDying or OnDeath event could be used to trigger the stuff.

 

You'll have to test it out to see what happens.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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