D
Deleted member 1281
Guest
My task is to have a controller articulate a plane's atc _id.
Using Doug's sound setup, I can pass a literal value to a macro that plays a sound, like so:
This, as you know, works just fine. Now what I want to get is to make the macro capture a value from an Lvar, like so
I could of course make it conditional like ...
... but at what a horrible waste of space and time. Any ideas for a more efficient solution?
Using Doug's sound setup, I can pass a literal value to a macro that plays a sound, like so:
Code:
<Macro Name="playsound">1 (>L:mysounds_@, number></Macro>
...
@play(helloworld) //plays mysounds_helloworld.wav
@play(1) //plays mysounds_1.wav ("one")
@play(Z) //plays mysounds_Z.wav ("zulu")
This, as you know, works just fine. Now what I want to get is to make the macro capture a value from an Lvar, like so
Code:
1 (>L:myvar, number)
@play((L:myvar, number)) // to play play mysounds_1.wav; but doesn't work
I could of course make it conditional like ...
Code:
(L:myvar, number) 1 == if{ @play(1) }
(L:myvar, number) 2 == if{ @play(2) }
...
(L:myvar, number) 65 == if{ @play(A) }
...
(L:myvar, number) 90 == if{ @play(Z) }
... but at what a horrible waste of space and time. Any ideas for a more efficient solution?
Last edited by a moderator: