View Full Version : CMS Operands
RoyHatch
8th October 2008, 06:50 PM
Could I get a list of the scripting operands and some syntax examples please. Specifically, what I am trying to do is use an axis change to add or subt a value (example 0.5) to the command GAMMA 1.0 to increase or decrease gamma.
The programming should go something like this
if js2.a2 is greater than 125 then add 0.5 to c ( which will start as 1.0)
and then do a gamma c in the game
or as an alternate method
as js2.a3 is rotated
do cms buttons to actuate gamma commands that increase gamma..
example:
cms.b9 = [js2.a3 < 25]
and b9 is gamma 1.7
this works but is cumbersome
Bob Church
9th October 2008, 08:03 AM
Hi RoyHatch,
It depends on what CMS.B9 does. If it's sending characters, you might be able to get around scripting by unchecking DX Mode and then using either the "Up/Dows" or "Position" functions. The Users Manual talks about them or you might look here (http://home.att.net/~stickworks/axisdialogs.htm) which is the same thing. If it's doing something with the button itself, it might be easier to set up a timer that sent the button pulses repeatedly as long as you hel it down. If what you're doing works but is clumsy, it must be doable, but it's hard to tell what the best way to do it is without knowing what it's has to do.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
RoyHatch
9th October 2008, 05:50 PM
the command I want to actuate is
gamma x
(x is a value from .1 to 2.0 and adjusts the brightness of the screen while you are in the game)
What I want to program is a value that I increment in the script. for example... every time I hit a button... it adds 0.1 to a constant (c) and then actuates the command
gamma (number that is now c)
do you have a list of operands.... thats < > eq + - and so forth and the syntax ... like
if js2.b5 then c eq c+.01
endif
cms.b12 and b12 has the command 'gamma c'
Bob Church
9th October 2008, 07:06 PM
Hi RoyHatch,
Well, the comparison operators are listed in the Users Guide, you can click the little yellow book icon at the or look at the page on the web here (http://home.att.net/~stickworks/mathcomps.htm) which is the same thing. Aside from what the page shows, it recognizes the standard "C" operators ( ==, !=, >, <, etc.), too.
The bigger problem is that the CM does 32-bit integer math internally and the output values are 8-bit integers. Unless you have some way to convert the 8-bit values coming out of DX, a standalone program of some sort that could take the output value and map it to floating point, "c + .01", etc. just isn't going to work.
Hope this helps!
Best Regards,
- Bob
The StickWorks
http://www.stickworks.com
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.