PDA

View Full Version : Slowing down my Micro Stick speed


Rawles
14-03-2005, 03:04 AM
Is there a way to slow the speed of my Hud Desiganator and Radar control that i have with this script.
I am controling my hud and radar movements with the Micro Stick controller on the Throttle .Hear is my script.


// CMS Script File
//
// Game Title:Lomac_LockOn
// Written By: Rawles
// Date:1-23-2005
//

//
//
script
%define AA js2.b27 // Throttle Up button
%define AG js2.b29 // Throttle Down button
%define nav js2.b31 // Throttle Left button

sequence
wait(AA);
CURRENTMODE = MODE3;
endsequence

sequence
wait(AG);
CURRENTMODE = MODE1;
endsequence

sequence
wait(nav);
CURRENTMODE = MODE2;
endsequence
cms.b1 = FALSE;
cms.b2 = FALSE;
cms.b3 = FALSE;
cms.b4 = FALSE;

// Ministick Up on cms.b1
//
if( [js2.a2 < 88] ) then
cms.b1 = TRUE;
endIf

// Ministick Right on cms.b2
//
if( [js2.a1 > 168] ) then
cms.b2 = TRUE;
endIf

// Ministick Down on cms.b3
//
if( [js2.a2 > 168] ) then
cms.b3 = TRUE;
endIf

// Ministick Left on cms.b4
//
if( [js2.a1 < 88] ) then
cms.b4 = TRUE;
endIf
SEQUENCE
WAIT( JS2.B2 AND JS2.B3 AND JS2.B4 ); // Wait for buttons 2,3 and 4 to get pressed on the throttle
DELAY( 1 ); // Wait half a second
CMS.B5 = TRUE; // Start Ejection Sequence
DELAY( 1 ); // Wait half a second
CMS.B5 = FALSE; // Reset CMS B1 state
DELAY( 1 ); // Wait half a second
ENDSEQUENCE
endScript

Bob Church
14-03-2005, 09:03 PM
Hi Rawles,

I'm guessing it's sending characters to the sim to move the view. That being the case, the rate is either controlled by the system autorepeat rate or simply by the frame rate, one tick of movement for every frame that you get.

To slow it down, you'd need to either set it up for mouse control if that's possible. Then the rate would vary based on the microstick position and you could turn the sensitivity down on the mouse and adjust it that way.

If you can't do mouse control, then about all you can do is to use an interval timer to generate actual makes and breaks on the keys. The only problem there is it's likely to be considerably slower, 10 to 20 cps or so. The basic code would involve bringing the bits that go to the CMS buttons now out to just bit variables, feeding those to the timers, then feeding the timers to the original CMS buttons. Something like:

if( [js2.a2 < 88] ) then
b1 = TRUE;
endIf

timer( interval, d1, 1, 1 ) = b1;
cms.b1 = d1;

That would leave the rest of the programming intact, it's just that b1 is activating the timer, the timer cycles off and on, and it's output then feeds the cms.b1 character rather than the if/then block feeding it directly. You could adjust things with the character rate setting on the Program Settings tab.

Best regards,

- Bob

The StickWorks
http://www.stickworks.com