PDA

View Full Version : BF1942 Mouselook Script



Yobbo
21st August 2004, 09:08 AM
I spent a few hours working this out, then found Michael's script does something similar/better?

Anyway, thought I'd post it see if it helps anyone, maybe someone could tweak it, my head hurts already.

Here's Michael's profile post (http://www.ch-hangar.com/forum/index.php?showtopic=99)


My Script.
I use FGTR+PT+PP.
Throttle mini stick controls mouselook aswell POV hat on Fighterstick.
CMS.B1 & CMS.B2 need to be set as mouselook activate keys.
CMS.A8 set to Mouse X axis
CMS.A9 set to Mouse Y axis

SCRIPT

CMS.B1 = ( [ JS2.A1 > 163 ] OR [ JS2.A1 < 93 ] OR [ JS2.A2 > 163 ] OR [ JS2.A2 < 93 ] ); // Toggle Mouse Look button on when mini stick moved

// LOOK CENTER
IF ( JS1.B24 ) THEN
CMS.B2 = FALSE;
CMS.A8 = JS2.A2;
CMS.A9 = JS2.A1;
SCALE( CMS.A8, 80, 15, GAIN3 );
SCALE( CMS.A9, 80, 15, GAIN3 );
ELSE
SCALE( CMS.A8, 100, 0, GAIN6 );
SCALE( CMS.A9, 100, 0, GAIN6 );
ENDIF

// LOOK UP
IF ( JS1.B25 ) THEN
CMS.B2 = TRUE;
CMS.A9 = 255;
ENDIF

// LOOK DOWN
IF ( JS1.B29 ) THEN
CMS.B2 = TRUE;
CMS.A9 = 0;
ENDIF

// LOOK RIGHT
IF ( JS1.B27 ) THEN
CMS.B2 = TRUE;
CMS.A8 = 255;
ENDIF

// LOOK LEFT
IF ( JS1.B31 ) THEN
CMS.B2 = TRUE;
CMS.A8 = 0;
ENDIF

// Next 3 sequences control index finger hat on throttle for changing throttle control zones

SEQUENCE
WAIT( JS2.B5 ); // Wait here until JS2.B5 clicks
SCALE( JS2.A3, 39, 5, GAIN6 ); // Set throttle for flying helos
ENDSEQUENCE

SEQUENCE
WAIT( JS2.B6 ); // Wait here until JS2.B6 clicks
SCALE( JS2.A3, 100, 5, GAIN6 ); // Set throttle normal
ENDSEQUENCE

SEQUENCE
WAIT( JS2.B7 ); // Wait here until JS2.B7 clicks
SCALE( JS2.A3, 60, 5, GAIN6 ); // Set throttle for flying planes
ENDSEQUENCE

ENDSCRIPT




Comments/Suggestions?

Yobbo
21st August 2004, 09:11 AM
Michael, I&#39;ve had the mini stick for a week now, been flogging it silly as you can see, wanted to give it a 2 week thrashing before I send the original with some beer :thumbsup:

Many thanks! :salute:

MichaelCHProd
21st August 2004, 08:21 PM
Your welcome and the script looks ok to me