Jump to content

[LE] Making an activator hide an object


Pnubs

Recommended Posts

Wow thanks for the help! I still have some experimenting to do but basically I'm using the Dwemer Observation Dome (technically an activator but I'm just using it as a static) which comes in three parts (I tried adding all three into the first script but couldn't get it to work so I added three separate scripts, don't know if that's harmful or not) and the Dwemer button. So when the player presses the button, those three parts of the dome disappear and ideally I would like a shader to come on in place of the three dome parts. (I was thinking about using the "become ethereal" shader). Now since you said that you can't see a shader when an object is disabled, I was thinking about making three "dummy" objects that are visually invisible to the player so that I can apply the ethereal shader. Not sure if this is viable but it's an idea. When the player presses the button everything reappears and there's no more shader. I also want to add some magical sound effects to this and I did see an option to add them in the button activator's menu, so I assume I could do that easily.

 

Edit: I'm only using the first script that you provided.

Edited by Pnubs
Link to comment
Share on other sites

To make something invisible, you can add the NullTextureSet to it in the creation kit. In the object, when choosing the nif, you can double click on the model parts to add a texture set. So your script would disable the visible dome, enable the invisible dome and apply the effect shader to the invisible dome.

Link to comment
Share on other sites

dylbill suggestion can only work if the vanilla mesh has a "NiAlphaProperty", if it dosen't then you need to extract the mesh > add to it a "NiAlphaProperty" > assign to it the corresponding textures > add the mesh as a "NEW" object to CK.
* It's better to have everything in one script.
* The sound must be an "FX sound" that will play once you turn it on and when you turn it off, NOT a loop, if you want a loop sound to play constantly once you activate it, then the script needs to change.

ObjectReference Property Ref01 Auto
ObjectReference Property Ref02 Auto
ObjectReference Property Ref03 Auto
 
ObjectReference Property InviRef01 Auto
{The Invisible Replacer 01 of your 'Dwemer Observation Dome '}
 
ObjectReference Property InviRef02 Auto
{The Invisible Replacer 02 of your 'Dwemer Observation Dome '}
 
ObjectReference Property InviRef03 Auto
{The Invisible Replacer 03 of your 'Dwemer Observation Dome '}
 
EffectShader Property MyVFX Auto
 
Sound Property MySFXon Auto
Sound Property MySFXoff Auto
 
ObjectReference Property SoundREF Auto
{The xMarker from where the sound FX on/off will play}
 
Bool Property IsTriggered = False Auto Hidden
 
 
AUTO STATE Waiting
Event OnActivate(ObjectReference akActionRef)
       GoToState("Empty")
   If ( IsTriggered == False )
        IsTriggered = True
        MySFXon.Play(SoundREF)
        InviRef01.Enable()
        MyVFX.Play(InviRef01)
        Ref01.Disable(True)
        InviRef02.Enable()
        MyVFX.Play(InviRef02)
        Ref02.Disable(True)
        InviRef03.Enable()
        MyVFX.Play(InviRef03)
        Ref03.Disable(True)
  Else
        IsTriggered = False
        MySFXoff.Play(SoundREF)
        Ref01.Enable(True)
        MyVFX.Stop(InviRef01)
        InviRef01.Disable()
        Ref02.Enable(True)
        MyVFX.Stop(InviRef02)
        InviRef02.Disable()
        Ref03.Enable(True)
        MyVFX.Stop(InviRef03)
        InviRef03.Disable()
EndIf
        GoToState("Waiting")
EndEvent
ENDSTATE
 
STATE Empty
         ;
ENDSTATE

 

 

 

* Your invisible replacers must be "Initially Disabled".

Edited by maxarturo
Link to comment
Share on other sites

Everything in the script works well, I really like how the parts "phase" in/out sequentially now and the sound effects are great. The only thing not working apparently is the VFX shader. Not sure what's going on with that...maybe having a null texture set is disrupting it somehow? I have the invisible objects set to "initially disabled" too. It would be really cool to have it but either way I'm not too concerned, especially with how the dome disappears now. Thank you very much for the help.

Edited by Pnubs
Link to comment
Share on other sites

I've never try to apply an "EffectShader" to an invisible or semi-invisible static mesh, so this could be the issue, if this is the case then just remove from the script everything related to "MyVFX". Experiment yourself with a normal "Static Object".


* NOTE: Some 'VisualEffects' and some 'EffectShaders' will not play in all statics, some are meant to play ONLY on actors.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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