LarryG on 11/5/2013 at 15:57
* * * N V G L O W T R A P --- S O L V E D * * *
I'm trying to get a kerosene lamp working such that when you frob the base, the wick adjuster turns and the lamp brightens/darkens accordingly. A problem I'm having is getting the lampshade's self-illumination property to fade up and down.
[video=youtube;jTb6tQcn3Nk]http://www.youtube.com/watch?v=jTb6tQcn3Nk[/video]
As you can see, using NVGlowTrap seems to keep adding Self-Illumination on TurnOn and does nothing on TurnOff, so the illumination keeps incrementing each time the lamp is cycled.
My Editor>Design Note is NVGlowIllumMax=10;NVGlowIllumMax=0
Without using NVGlowTrap, the normal AnimLight feature is done, with the illumination just going on/off immediately with no ramping up/down.
Setup: the base is a switch cd linked to the shade, which is an animlight. The base has StdLever and NVFrobToggle (to send the TurnOn/Offs immediately, rather than waiting for TweqComplete).
Any suggestions?
Edit: I almost think that one thing I need is a new script to use in place of StdLever, one which Sends the TurnOn/Off on FrobWorldEnd. But that would only eliminate my sending duplicate TurnOn/Offs. Maybe that would be enough to fix this?
Edit2: Getting rid of StdLever fixed the ever increasing illumination. So I guess judicious use of NVTweqDevice and NVRelayTrap, together with NVFrobToggle could replace StdLever to get everything done. But if The Watcher is watching, a new NonStdLever script would be handy.
LarryG on 11/5/2013 at 18:46
[video=youtube;uMNHkx5sfrg]http://www.youtube.com/watch?v=uMNHkx5sfrg[/video]
As you can see, I've solved the initial problem by replacing StdLever with NVFrobToggle (NVFrobToggleTDest="[Me]"), NVTweqDevice, and NVRelayTrap. But I have a new one: no sound from the switch. The sounds worked with StdLever, and NVTweqDevice is supposed to activate them, but I don't get any sound when the tweq is activated.
Any suggestions for this?
Edit: This is my schema for this. As I say, It works with StdLever.
Code:
//TURN LEVER ON
schema LvTurnOn
archetype DEVICE_SWITCH
volume -100
LvTurn
env_tag (Event Activate) (SwitchType LvTurn) (DirectionState Forward)
//TURN LEVER OFF
schema LvTurnOff
archetype DEVICE_SWITCH
volume -100
LvTurn
env_tag (Event Deactivate) (SwitchType LvTurn) (DirectionState Reverse)
Nameless Voice on 11/5/2013 at 19:41
NVTweqDevice plays the schema tags "Event Activate" and "Event Deactivate", not any of those "DirectionState" tags.
LarryG on 11/5/2013 at 19:59
Event Activate and Event Deactivate are specified. That's why I posted the schema. See:
Code:
//TURN LEVER ON
schema LvTurnOn
archetype DEVICE_SWITCH
volume -100
LvTurn
env_tag (
Event Activate) (SwitchType LvTurn) (DirectionState Forward)
//TURN LEVER OFF
schema LvTurnOff
archetype DEVICE_SWITCH
volume -100
LvTurn
env_tag (
Event Deactivate) (SwitchType LvTurn) (DirectionState Reverse)
Edit: I removed the (DirectionState Reverse) and (DirectionState Forward) and it is now working. Why would having those mess up NVTweqDevice? Oh well, color this
* * * N V T W E Q D E V I C E --- S O L V E D * * *
Nameless Voice on 11/5/2013 at 22:43
The TweqDevice doesn't specify a DirectionState, so I guess that's not considered to be a match.