Is there a way that I can set a LocalVar to a value of 1 without relying on update code in the XML?
I need to pass a 1 for an LVar in my scenery simobject when a certain condition is met, to tie it into a Wwise sound, however Update Code does not seem to work outside of aircraft, and those are the only examples I can find, so I'm unsure how to go about setting this value...
Using my current update code, I can see the LVar in the Behaviors menu in sim, but the value is stuck to 0.
<Component ID="CAMPFIRE_LVAR_UPDATE">
<UseTemplate Name="ASOBO_GT_Update">
<FREQUENCY>30</FREQUENCY>
<UPDATE_CODE>
(A:AMBIENT TEMPERATURE, celsius) 10 <=
if{
1 (>L:CAMPFIRE_ACTIVE)
} els{
0 (>L:CAMPFIRE_ACTIVE)
}
</UPDATE_CODE>
</UseTemplate>
</Component>
Any ideas? (I am aware that I can use a SimVar in the Wwise XML for this A:var, but I still need this L:var method to work for other SimObjects!)
Edit: Also, why couldn't you use some code like the following to make this work? Maybe my XML structure isn't right, but even something as simple as this, that I would think would work does not:
<Component ID="CAMPFIRE_WWISE">
<Visibility>
<Parameter>
<Code>(A:AMBIENT TEMPERATURE, celsius) 10 <= if{ 1 (L:CAMPFIRE_ACTIVE) }</Code>
</Parameter>
</Visibility>
</Component>