Hey guys,
I have the following template
<Template Name="Switch_Light_Strobe">
<Parameters Type="Default">
<INTERACTION_TYPE>SWITCH</INTERACTION_TYPE>
<LIGHT_TYPE>STROBE</LIGHT_TYPE>
</Parameters>
<UseTemplate Name="ASOBO_LIGHTING_Light_Template" />
</Template>
which works perfectly fine except one little issue. When switching the switch from the off position to the auto position, the light flashes once (until the UPDATE code within the ASOBO_LIGHTING_Light_Template is run which sets the Potentiometer to 0 - whereas it is set to 100 in the off position).
To fix this issue I’ve been trying to override the LIGHT_UPDATE_CODE in the ASOBO_LIGHTING_Light_Template Template to also set the Potentiometer to 0 in the off position. As this Parameter is set within a Override-Parameters-Set in that template I tried to do something like this:
<Template Name="Switch_Light_Strobe">
<Parameters Type="Default">
<INTERACTION_TYPE>SWITCH</INTERACTION_TYPE>
<LIGHT_TYPE>STROBE</LIGHT_TYPE>
</Parameters>
<Parameters Type="Override">
<STATE_ON_ID>0</STATE_ON_ID>
<STATE_X_ID>1</STATE_X_ID> <STATE_X_VAR>L:#LIGHT_TYPE#_#SIMVAR_INDEX#_Auto</STATE_X_VAR>
<STATE_X_TT>@TT_Auto</STATE_X_TT>
<STATE_X_VALUE>1</STATE_X_VALUE>
<STATE_OFF_ID>2</STATE_OFF_ID>
<TYPE>OnOffX</TYPE>
<LIGHT_UPDATE_CODE>
(A:LIGHT STROBE:0, Bool) if{
(L:STROBE_0_Auto) if{
(A:SIM ON GROUND, Bool) ! 100 * (>K:LIGHT_POTENTIOMETER_24_SET)
} els{
100 (>K:LIGHT_POTENTIOMETER_24_SET)
}
} els{
0 (>K:LIGHT_POTENTIOMETER_24_SET)
}
</LIGHT_UPDATE_CODE>
</Parameters>
<UseTemplate Name="ASOBO_LIGHTING_Light_Template" />
</Template>
The Potentiometer is therefore now set to 0 in the off position. This works fine. But for some reason this introduced the issue that the light does not flash twice (which is usual on the strobe lights). Before this change of overriding these parameters the strobe lights flashed twice as expected.
Thanks alot in advance with this one! Any help is highly appreciated.