View Full Version : Axis value when button held.
Chris0381
17th August 2008, 10:41 PM
I want to program a slip-slude command to slow down and part of it involves making js1.a1 = 155 (aileron) when JS1.B5 is held.
This allows for partial aileron instead of full aileron that would make me spin.
Ideally it would be
IF (JS1.B5) = true
then
JS1.A1=155
or something like this.
The axis is contolled by X movement of the CS.
Any suggestions.
Thanks
DonULFonso
17th August 2008, 11:28 PM
You need to set the output of the logical axis CMS.A1 (on the "CMS Settings" tab of the CM's GUI; note that you need to have scripting enabled in your map) to the value of 155 if JS1.B5 is held and reset its output to the input of the physical axis JS1.A1 (note that you need to clear this axis from any direct output on the "Fighterstick" (or whichever stick you're using) of the CM's GUI) when it is released.
Bob Church
17th August 2008, 11:56 PM
Hi Chris,
Also, you don't really need to check for equality, bits are only TRUE or FALSE and the "IF" itself answers that question. You'd need a script like this:
script
cms.a1 = js1.a1;
if( js1.b5 ) then
cms.a1 = 155;
endIf
endScript
Then up in the GUI you'd need to unassign the stick axis itself (js1.a1), set it to "None" and "None" on the right side of the screen, and then assign Axis 1 on the CMS Controls tab to CM Device 1, X axis or wherever js1.a1 is going now.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
Chris0381
18th August 2008, 12:03 AM
Thanks Bob and Don.
Works nice.
Now lets see if I can put some other goodies in there to slow the plane down.
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.