Rotornut44
Resource contributor
- Messages
- 658
- Country
This is a duplicate of my thread on the DevSupport Forums. Posting here to try to reach more people who might know an answer to this...
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.
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!)
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:
I don't understand why it would be so difficult to get something like this working. 6 days I've been trying to solve this... I've sat down with 2 aircraft developers that do nothing but XML, and we've found many solutions, but none work when it comes to scenery. Probably because they rely on some sort of update code to work.
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.
Code:
<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!)
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:
Code:
<Component ID="CAMPFIRE_WWISE">
<Visibility>
<Parameter>
<Code>(A:AMBIENT TEMPERATURE, celsius) 10 <= if{ 1 (L:CAMPFIRE_ACTIVE) }</Code>
</Parameter>
</Visibility>
</Component>
I don't understand why it would be so difficult to get something like this working. 6 days I've been trying to solve this... I've sat down with 2 aircraft developers that do nothing but XML, and we've found many solutions, but none work when it comes to scenery. Probably because they rely on some sort of update code to work.