I know that there is a way to have meals on the table set to appear/disappear at certain times because I've seen it in a few mods. I'm assuming its a script. Anybody know how its done?
I know that there is a way to have meals on the table set to appear/disappear at certain times because I've seen it in a few mods. I'm assuming its a script. Anybody know how its done?
give all the foodstuff on the table an enable parent. Then enable that when you want the table set, and disable it when you want it clear. I usually use an xmarker off to the side. You can have several markers, each with different enable children, so you can have flowers and whatnot there when not using the table for meals
If you want the food to disappear during a scene, that's harder, but the same principle.
Is there a guide to how to work with enable parent? I have not worked with that. Thanks, Doc.
You can test this by using something visible, like a skull or a flat iron, in place of the xmarker. then you can select it in game and disable it and see if the plate vanishes too
One marker can have lots of enable children, and you can have chains with children having children of their own.
Also you can select a lot of refs in the cell info window and right click to set the enable parent for them all
One last thing - you can set a ref to have the opposite enable state to its parent. So if you want to have either flowers or food, you can make the flowers use the opposite enable state and you'll have either flowers or food depending on the state of the xmarker
Let me see if I can play around with this getting it to work over the next day or so. THANKS!
Ok, question right off. From your instructions, where is the appear and disappear of the food set? I was hoping that this could be set automatically to happen at a specific time or times, not something I'd have to click on to work?
You need a script property pointing at the x-marker, or whatever you use as root. Then just enable it or disable it.
Let me tell you a story: There's a sheltered, hard to find valley in Skyrim, home of the Aleator family estate for countless generations. Centuries ago, an old, faithful retainer would light the lamps every night and put them out the following morning. One night he suffered a heat attack in the middle of his rounds, but such was his loyalty and determination that he finished the circuit, lighting all the lamps before he died.
As he has done every night since.
This is his script. Feel free to adapt it
Scriptname QAYL_Lamplighter_Script extends ObjectReference import debugGlobalVariable Property Hour Auto ObjectReference Property lamp_toggle Auto bool function is_day() float h = hour.GetValue() return h > 5 && h < 20endfunctionEvent OnLoad() trace("QAYL: Lamplighter: WhhhooooOOOOoooooooOO!") if is_day() lamp_off() else lamp_on() endif RegisterForSingleUpdateGameTime(1.0)EndEventEvent OnUnload() UnregisterForUpdateGameTime()EndEventEvent OnUpdateGameTime() if is_day() lamp_off() else lamp_on() endif RegisterForSingleUpdateGameTime(1.0)endeventfunction lamp_on() if !is3dloaded() return endif if lamp_toggle.isEnabled() return endif lamp_toggle.enable()endfunctionfunction lamp_off() if !is3dloaded() return endif if lamp_toggle.isDisabled() return endif lamp_toggle.disable()endfunction
Doc, that is great you are will to share your script, but I have not learned how to script at all yet, so I'm at a loss. Guess I'll have to learn scripting or forget about eating in skyrim.
Well, I can recommend the CK wiki scripting tutorials.
I don't know any way of doing timed events without a script.
Yes, I've been looking at the wiki....its not exactly terribly detailed nor specific. How did you learn it?
I started with layout essentials and worked through them all. They're not comprehensive - you need to ask a lot of questions and read a lot of scripts and so on - but they show you how to go about things.
For instance, the scripting tutorials shows you how to attach a script to an object, and how to define and set a property. If you can do that, then you should be able to attach my lamplighter script to a static reference somewhere in the cell where you want the timer. I had a skull for my lamplighter ghost to live in, but anything will do.
After that, point the lamp toggle property at your enable parent and save. When you enter the cell in-game, the OnLoad event will run and the timer will start.
(Hmm... I thought I'd been a bit clever than that about the update loop. It certainly doesn't need to run every second).