How can I toggle an Anim Light set to “slide smoothly” at set intervals? - by MisakaMikoto
Yandros on 6/3/2018 at 22:35
Actually, I believe you will have to have two separate traps here. Your design note above of OnDelay=1000 and OffDelay=2000 won't work if you set it to repeat indefinitely, as the On will be firing every second and will trample the Off firing every 2 seconds. Give me a bit and I'll figure out a solution. I assume you still want it to stay off for 6 seconds before coming back on?
MisakaMikoto on 6/3/2018 at 22:47
Yeah, what I'm actually aiming for is this:
• 16 lights.
• Starting as soon as the mission begins and continuing in perpetuity, all lights will be lit in the following pattern: on for 2000 (fade in 1000, fade out 1000), then off for 6000.
• However, light 2 will not initially turn on until 500 after light 1, and so forth (light 3 initially turns on 500 after light 2, etc.).
If you have any insight, I appreciate it—but don't feel as if you have to put yourself out over this! I finally worked out how to get the same effect in my blue room using 16 room brushes, a deaf/blind Keeper, and a TeleportTrap.
Yandros on 7/3/2018 at 00:48
Here's a demo with the initial setup working: (
http://www.wearytaffer.com/storage/demo/LightDemo.mis)
It requires three script markers per light source. The reason for that is, the infinite repeating capability of NVRelayTrap requires a common delay between On and Off, so they have to be split into two traps. Then a third marker which is the initial 1000 delay for the TurnOff. You should be able to link the two main traps to multiple lights which would then have the same timing, or duplicate all three traps to have different timings on other lights. The single lever which fires it all on sim start need not be duplicated, it can just be linked to multiple instances of the setup as needed. Also, I got the fade in/out using smoothly dim for the anim light setting, and 1000 for the times to come on and off.
MisakaMikoto on 7/3/2018 at 01:18
Dang. Wow.
Thank you! This will be a tutorial all in itself.
I'm very grateful for your having gone to all this trouble for me. Really—thank you very much.
Yandros on 7/3/2018 at 02:19
No problem. I love figuring out how to do stuff like this for people, just ask Random_Taffer. :D
Seriously though, there's probably a better, more elegant and concise way to do it that eludes me. Chances are NV or R Soul or Firemage or LarryG will come along with it.
Zontik on 7/3/2018 at 09:55
Why so complex?
Just link to your light another object with TrigFlicker script on it and set its timing to 6000. It will turn on and off your light with desired interval.
You just need to initiate this object first turning it on somehow.
Yandros on 7/3/2018 at 11:49
Won't that turn it on for 3000 and then off for 3000? That's not what is wanted here.
LarryG on 8/3/2018 at 06:34
Yeah. I'm thinking that a setup like this might work:
1. Marker with NVRelayTrap.
Quote:
NVRelayTrapOn="Sim"; NVRelayTrapOff="Null"; NVRelayTrapTOn="LightOn"; NVRelayTrapCount=1
CD to the 1st light in the chain.
2. 1st Light with Animlight, NVRelayTrap, NVRelayTrap2, and NVRelayTrap3.
Quote:
NVRelayTrapOn="LightOn"; NVRelayTrapTOff="TurnOn"; NVRelayTDest="[Me]"; NVRelayTrapDelay=7000;
NVRelayTrap2Off="Null"; NVRelayTrap2TOn=TurnOff"; NVRelayTrap2TDest="[Me]"; NVRelayTrap2Delay=1000;
NVRelayTrap3TDest=second_light_in_the_string; NVRelayTrap3Off=""Null"; NVRelayTrap3Delay=500; NVRelayTrap3TOn="LightOn"
3. Each subsequent light is set up like 1st light, except for the last which doesn't need NVRelayTrap3, since it doesn't trigger any more lights.
4. Your lights need to have the millisecs to brighten / dim set to 1000, and mode to minimum brightness.
What this accomplishes:
1. All lights are off at sim start.
2. At sim start a "LightOn"message is sent to the 1st light.
3. After 7 seconds the 1st light sends a "TurnOn" to itself, turning on the light via animlight.
4. One second later, it sends a "TurnOff" to itself via the 2nd NVRelayTrap, i.e. just after a completed fade-in.
5. This turns off the light and triggers the 1st NVRelayTrap to repeat in 7 seconds (1 second for the fade-out and then 6 seconds for darkness)
6. Meanwhile, the "TurnOn" from step 3 triggers the third NVRelayTrap to send a "LightOn" message to the next light in the chain after half a second.
I think this meets your requirements as I understand them with only one extra object and mostly copy pasted design notes for each light.
Unna Oertdottir on 8/3/2018 at 10:43
Some Flicker Triggers should also work for intervals. You might check the setup of the lights in front of the mall in
The Stupid Grimrock Quote Reloaded.
MisakaMikoto on 8/3/2018 at 13:29
Wow, have I got a lot to learn. Thank you both (thank you all) for the programming tutorial.
I actually have a bit of a programming background, but I couldn't get a handle on the syntax here. This gives me a lot to go on—so, again, thank you very very much.