Hi all!
I have set a global variable on init (controller -> mapping -> ...):
set '$var1' 0.5
and it works...
But how can I set a local variable on init for the left deck only?
I have set a global variable on init (controller -> mapping -> ...):
set '$var1' 0.5
and it works...
But how can I set a local variable on init for the left deck only?
geposted Sun 26 May 24 @ 3:42 pm
check the wiki, .... and the description/explanation of Variables,
(particularly, local variables).
https://www.virtualdj.com/wiki/VDJscript.html
hint:
remove the "$" from variable name.
and add the deck specifier
the INIT would now be:
(particularly, local variables).
https://www.virtualdj.com/wiki/VDJscript.html
hint:
remove the "$" from variable name.
and add the deck specifier
the INIT would now be:
deck 1 set 'var1' 0.5
geposted Sun 26 May 24 @ 8:55 pm
Thank you very much!!! Now it works!
But....
I tried something similar and it does not work:
deck left set %varx 0.5
deck left set '%varx' 0.5
This worked:
deck left set 'varx' 0.5
deck 1 set 'varx' 0.5
deck 1 set %varx 0.5
deck 1 set '%varx' 0.5
The manual states that both %varx and 'varx' can be used as local variables. But here it does not work in both cases with "oninit"
My Conclusion:
If you want to use a variable with "%" at the beginning (like %var), then you cannot use the expression "deck left", but must use "deck 1".
Can someone confirm this?
But....
I tried something similar and it does not work:
deck left set %varx 0.5
deck left set '%varx' 0.5
This worked:
deck left set 'varx' 0.5
deck 1 set 'varx' 0.5
deck 1 set %varx 0.5
deck 1 set '%varx' 0.5
The manual states that both %varx and 'varx' can be used as local variables. But here it does not work in both cases with "oninit"
My Conclusion:
If you want to use a variable with "%" at the beginning (like %var), then you cannot use the expression "deck left", but must use "deck 1".
Can someone confirm this?
geposted Mon 27 May 24 @ 1:28 am
you wouldn't really use deck left for setting a variable, left isn't a real deck, it's just the deck that is the left deck at the time, the actual variable will be saved to the numbered deck that is left at the time.
geposted Mon 27 May 24 @ 2:21 am
Thank you, that makes sense.
geposted Mon 27 May 24 @ 2:27 am