Jump to content

[LE] Activators - Toggling Between Two States of Enabled/Disabled Refs?


Recommended Posts

I have experience with the Creation Kit and it's mechanics, so I understand how applying scripts and activators and stuff works, but I'm very, very inept at scripting itself and how scripts work. I've been able to achieve some very barebones stuff using preexisting scripts, but I've run into a wall trying to do something that should be (on a technical level) extremely simple.

 

I'm trying to create a very simple device: An unfurled rug is covering a stash in the ground. When activated (either by making the rug itself an activator or creating a triggerbox), the unfurled rug (and it's triggerbox, if it has one) is DISABLED and disappears. In its place, a folded rug is ENABLED, giving the illusion of the player "folding" the rug up themselves. This folded rug also has an associated trigger/activator status that is enabled along with the folded rug itself, and activating THAT will disable the folded rug and re-enable the unfolded one. This process may then repeat, if the player desires. This overall contributes to a system that allows the player to fold/unfurl this rug on the ground by activating whatever is enabled at the time at their leisure.

 

While that's kind of a mouthful to explain, it seems like an extremely simple system and a very entry-level scripting exercise. However, I don't know how to find any tutorials for this or anything like it - all google searches of "skyrim creation kit enable/disable object with activator" and similar queries failed to return meaningful results.

 

Could anyone direct me to a pre-existing tutorial, or can someone give a brief explanation of how to accomplish this? I assume I wouldn't need to do anything fancy like making my own script - this is such a simple task, there's bound to be an "enable/disable ref on activate" script preexisting within the CK.

 

Here's a shoddy screenshot kinda explaining what I'm trying to do, if that explanation was too confusing: https://imgur.com/a/DCi0Kja

Link to comment
Share on other sites

It should be pretty straightforward, for example:

 

2 rugs in statics for simplicity, 2 triggerboxes. Enable parents as follows:

 

FoldedRug => FoldedRugTrigger

UnfoldedRug => UnFoldedRugTrigger

 

So the statics Enable/disable following their triggers. Alternatively have the rugs be activators with their own collision box integrated

 

Then link the triggers as linked references, so the linked ref of one is the other and viceversa.

 

Then the triggers would need a script to disable self and enable the linked ref when activated. I think there are default scripts for this. Looking at the list here: https://www.creationkit.com/index.php?title=Default_Scripts_List

You could try adding defaultEnableLinkedRefOnActivate and defaultDisableSelfOnActivate to each and should work.

 

If one can't do that linked ref loop then use defaultDisableOtherObjectOnActivate and link each other via the property

Edited by FrankFamily
Link to comment
Share on other sites

There is a youtube tutorial of that nature with two candles lit and unlit. DarkFox127 had something similar in his How it's done tutorial with a lightable fireplace.

 

Make two copies of some activator and edit to use the two rug meshes. Put a script on each with an onactivate event. Add a property of the rug you want to activate. When filling the property have the cell open with the OtherRug in view and fill the property by clicking on it. When the rug is activated have it enable the OtherRug then disable itself. Do the same thing for the other rug.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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