Quick Sign In:  

Forum: Old versions

Topic: VDJ Script help

This topic is old and might contain outdated or incorrect information.

Yes. I need some help with VDJ Script!

I'm trying to turn on a LED on a controller when the FX slider is above a certain amount.

The code(s) that I have tried are:

effect 'flanjet' slider 1 & param_greater 50% ? on : off
effect 'flanjet' slider 1 & param_greater 0.5 ? on : off
effect 'flanjet' slider 1 & param_cast 'percentage' & param_greater 50% ? on : off
get effect 'flanjet' slider 1 & param_greater 50% ? on : off
get effect 'flanjet' slider 1 & param_greater 0.5 ? on : off
get effect 'flanjet' slider 1 & param_cast 'percentage' & param_greater 50% ? on : off

Of course nothing of these works.
Is there any way to turn on a LED when a slider is beyond a certain point ?

PS: I cannot use variables since there is NOT a calling slider here. I mean that I don't have a slider that will control the effect slider so that I can set a variable and then use this variable for the LED.

Thanks!
 

Posted Wed 06 Mar 13 @ 6:31 am
not possible in my experience.. Hopefully a teamer can shed some light on the subject
 

Posted Wed 06 Mar 13 @ 6:36 am
djdadPRO InfinityDevelopment ManagerMember since 2005
That was not easy...lol

get text '`effect "flanjet" slider 1`' & param_cast 'percentage' & param_greater 50% ? on : off
 

Posted Thu 07 Mar 13 @ 2:33 am
sorry to swear but holy shiz you rule Babis if that works!
 

Posted Thu 07 Mar 13 @ 3:52 am
WTF????
LOL
Great. I'll test it. However I modified my Watchdog plug-in to give me the values through variables :P

I have another question too:
Is there any way besides the "get text" command that we can get some text to display on a controller ? I tried to set the text on a variable but it seems that variables can only hold numbers (integers) and not text...
 

Posted Thu 07 Mar 13 @ 4:48 am
djdadPRO InfinityDevelopment ManagerMember since 2005
I dont currently have any controller with LCD display to test, but what exactly do you want to display/achieve and need to use a text variable ?
 

Posted Thu 07 Mar 13 @ 12:44 pm
djdad is king

here i got one: repeat 1ms & down ? filter +2% : filter 50%

instead of 50% i want it to -2% when i release the button, back to 50% on its own, i tried : repeat 1ms & up ? filter -2% to 50% lol no such luck, i know there is a link threw the maze on the site that shows examples for multiple variables, like if you want a button to do more than just 1 action or another, but you can have it do 3 or 4 depending on true or fales return, i just couldnt figure it out on my own

thanks in advance

-cheers
 

Posted Thu 07 Mar 13 @ 9:49 pm
djdad wrote :
I dont currently have any controller with LCD display to test, but what exactly do you want to display/achieve and need to use a text variable ?

I want to substitute some text characters. I can use my Watchdog plug-in to get and manipulate the text but I can't serve it back to the controller...
 

Posted Thu 07 Mar 13 @ 10:54 pm
secretseven wrote :

here i got one: repeat 1ms & down ? filter +2% : filter 50%

instead of 50% i want it to -2% when i release the button, back to 50% on its own, i tried : repeat 1ms & up ? filter -2% to 50% lol no such luck, i know there is a link threw the maze on the site that shows examples for multiple variables, like if you want a button to do more than just 1 action or another, but you can have it do 3 or 4 depending on true or fales return, i just couldnt figure it out on my own


You can't repeat the "UP" state of a button. If you could it would "stuck" since it would execute it's code constantly.
If you want to bring filter back to 50% smoothly then you have to map another button to:
repeat 1 ms & filter 50% ? nothing : filter -2%
 

Posted Fri 08 Mar 13 @ 12:34 am
SBDJPRO Infinity Member since 2006
PhantomDeejay wrote :
I want to substitute some text characters. I can use my Watchdog plug-in to get and manipulate the text but I can't serve it back to the controller...


I can't think of a way without an impossibly long and convoluted bit of VDJScript comparing each individual letter of the string stored as individual variables with each possible letter value!
 

Posted Fri 08 Mar 13 @ 6:44 am
Yikes...

Scott the SDK supposedly allows users to create controller plug-ins (similar to version 5 plug-ins)
However this never worked as far as I know. :(
 

Posted Fri 08 Mar 13 @ 7:08 am
SBDJPRO Infinity Member since 2006
Just tested on 7.3 and still no joy there I'm afraid.

Yikes indeed to the other solution!
 

Posted Fri 08 Mar 13 @ 7:57 am
PhantomDeejay wrote :
secretseven wrote :

here i got one: repeat 1ms & down ? filter +2% : filter 50%

instead of 50% i want it to -2% when i release the button, back to 50% on its own, i tried : repeat 1ms & up ? filter -2% to 50% lol no such luck, i know there is a link threw the maze on the site that shows examples for multiple variables, like if you want a button to do more than just 1 action or another, but you can have it do 3 or 4 depending on true or fales return, i just couldnt figure it out on my own


You can't repeat the "UP" state of a button. If you could it would "stuck" since it would execute it's code constantly.
If you want to bring filter back to 50% smoothly then you have to map another button to:
repeat 1 ms & filter 50% ? nothing : filter -2%


so there is NO way to make it -2% then stop at 50% ?
 

Posted Fri 08 Mar 13 @ 9:59 am
secretseven wrote :
so there is NO way to make it -2% then stop at 50% ?


there was a post from a teamer that posted a solution about two months ago, I never ended up trying it as I was busy at the time but I think it was something like

down ? repeat 5ms & filter +2% : filter 50%

 

Posted Fri 08 Mar 13 @ 11:42 am
synthet1c wrote :
secretseven wrote :
so there is NO way to make it -2% then stop at 50% ?


there was a post from a teamer that posted a solution about two months ago, I never ended up trying it as I was busy at the time but I think it was something like

down ? repeat 5ms & filter +2% : filter 50%



that was probably me, but instead of it just jumping back to 50% when i release, i'm wanting it to gradually go back to 50% on its own when released, if this is possible
 

Posted Mon 11 Mar 13 @ 11:56 am
No, that's not possible!
 

Posted Mon 11 Mar 13 @ 11:59 am


(Old topics and forums are automatically closed)