PDA

View Full Version : Scripting Pro,s Please Help_Bob,Abe,Anybody?


Rawles
22-02-2005, 07:06 PM
Hey ?I have done a script to have the pov on the throttle act as the mode select switch for Lomac.
POV UP is A2A mode
POV Left is Nav Mode
POV Down is A2G mode

I dont know were i have gone wrong the script checker says it,s ok .


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

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

sequence
wait(AA);
CURRENTMODE = MODE2;
endsequence

sequence
wait(AG);
CURRENTMODE = MODE3;
endsequence

sequence
wait(nav);
CURRENTMODE = MODE1;
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

Can you take a look at this for me? I think something might be wrong in the CMS Control butt i cant find were .When i do the Key Check to test and see if the mode select is working it dosent.

Bob Church
23-02-2005, 12:04 AM
Hi Rawles,

I don't know what's going wrong. I loaded the script up and it seems to change modes just fine here. I get a 1, 7, or a 2 as a result of moving the hat itself (I'm actually using the first copy you posted a couple of threads down) and I programmed one of the throttle buttons to send "abc" in Mode 1, "def" in Mode 2, and "ghi" in Mode 3. Seems to work fine.

One thing, not really to do with that, but I noticed you're filling in all three modes with the same commands on some of the buttons. All you need to do is fill in Mode 1. So long as Mode 1 is there, any of the other modes that's left blank will use the keys, etc. from the Mode 1 block, it sets the default. It doesn't really matter, just saves a lot of typing.

Anyway, what makes you think the Mode isn't changing?

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

Rawles
23-02-2005, 01:48 AM
When i try and program Hat 1 on the Joystick it dosent change modes.

Rawles
23-02-2005, 02:08 AM
Ok I think i have fixed it i might have put stuff were i dident need to and i think i have my POV# a little off fixing it now. Ill Let ya know soon Thanks for the Responce..! Your right it takes along time to get the hang of this. :)

Bob Church
23-02-2005, 03:58 AM
Hi Rawles,

Okay. I was using your map and the POV switch on the Pro Throttle was the one that was changing the mode. Up, Left, and Down seemed to work. I just took your programming off one off the 4th button on the front of the throttle handle, I think it had something to do with the TrackIR, but it was the same for all three modes. Anyway, it cycled through just fine, so I don't think there's anything wrong with what you did there as far as the mode change goes.

Best regards,

- Bob

The StickWorks
http://www.stickworks.com

MichaelCHProd
23-02-2005, 05:44 AM
I've seen this post before ;)