SimHQ
Previous Thread
Next Thread
Print Thread
Rate Thread
Hop To
Page 2 of 2 1 2
Joined: Dec 2010
Posts: 2
M
Junior Member
Junior Member
M Offline
Joined: Dec 2010
Posts: 2
tried some of this programming but always get :

Runtime Error: Symbol not found: LED_INTENSITY in main ( line 10 in led test.tmc )

or somme such with the first line it encounters with the led commands

(new instal of Warthog and latest TARGET)

Inline advert (2nd and 3rd post)

Joined: Nov 2010
Posts: 37
H
Junior Member
Junior Member
H Offline
Joined: Nov 2010
Posts: 37
Make sure that the correct hid.tmh and target.tmh are present where you store your script files. I had the problem that the old (default) scripts were not removed when installing the newest version of TARGET software. And I got the same error when I ran a script.
hid.tmh, 17.235 KB, 4-3-2011.
target.tmh, 26.623 KB, 4-3-2011.

hsth #3242238 03/23/11 12:26 AM
Joined: Dec 2010
Posts: 2
M
Junior Member
Junior Member
M Offline
Joined: Dec 2010
Posts: 2
Thanks hsth, that was the fix.
My scripts where residing in a non standard location on the disk. The instal of the new TARGET evidently did not know about it.
Replacing those two files in the folder with my scripts did the trick. Now, not only the .fcf files but my programmed scripts' (tmc) LEDs light correctly.
The files I transfered did not have the same weight as the ones you mentioned but the dates where the same (4-3-20011).

A word of warning about this before reinstalling TARGET from Thrustmaster would have been helpful; like in the instal file verbiage. I am sure putting hard worked on scripts out of harms way from loss in the 'standard' location is a frequent enough behavior of gamers....Rant out...

Thanks again hsth

Joined: Mar 2006
Posts: 102
V
Member
Member
V Offline
Joined: Mar 2006
Posts: 102
Hi
I need help to make a LED flash as long as a function is enabled(WeaponEnable) and stop when the flashing when WeaponDisable gets in effect.
The function that allows me to have a kind of MasterArm for IL2.
The code enable certain weapon fuctionality for 3 min (180000) when the MasterArm key is pressed.

BTW I did not make the code WinkNGrin

Quote:

MapKey(&Throttle, CHF, EXEC("WeaponsEnable(); DeferCall(180000, &WeaponsDisable, enablecount);")); // on CHF, enable weapons, then defer WeaponsDisable call after 180000ms (180s)

Quote:

int enablecount;
int WeaponsEnable()
{
enablecount = enablecount + 1;
MapKeyUMD(&HCougar, S4, DX4, DX3, USB[0x05]);
MapKey(&Throttle, CHB, DX7);
//MapKey(&Throttle, CHB, PULSE+L_SHIFT+USB[0x18]);
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1));
}

int WeaponsDisable(int p)
{
if(p != enablecount) return 0; // take in account only the latest WeaponsEnable press
MapKeyUMD(&HCougar, S4, USB[0x05], USB[0x05], USB[0x05]);
MapKey(&Throttle, CHB, 0);
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));
}



Will we EVER get a real Rainbow Six game again. One for the real Tactic fans? A WWII sim with a dynamic campagn. Games with deept?
Joined: Oct 2010
Posts: 83
N
Junior Member
Junior Member
N Offline
Joined: Oct 2010
Posts: 83
Use the following code:

Code:
int enablecount;
int WeaponsEnable()
{
	MapKeyUMD(&HCougar, S4, DX4, DX3, USB[0x05]);
	MapKey(&Throttle, CHB, DX7);
	if(!enablecount) ActKey(KEYON+REXEC(0, 200, "ActKey(KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT^LED1));", RNOSTOP));
	enablecount = enablecount + 1; 
}

int WeaponsDisable(int p)
{
	if(p != enablecount) return 0; // take in account only the latest WeaponsEnable press
	MapKeyUMD(&HCougar, S4, USB[0x05], USB[0x05], USB[0x05]);
	MapKey(&Throttle, CHB, 0);
	StopAutoRepeat(0);
	ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));	// make sure the LED1 is off
	enablecount = 0;
}

Last edited by Nicu; 05/23/11 09:41 AM.
Page 2 of 2 1 2

Moderated by  RacerGT 

Link Copied to Clipboard
Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
God Forbid they want to have a bit of fun at work
by NoFlyBoy - 09/22/26 08:50 PM
How a 5" 38 Caliber US Naval Gun Works
by F4UDash4 - 09/19/26 01:20 AM
100% commission based sales
by PanzerMeyer - 09/18/26 04:47 PM
Relativity
by Terl9999 - 09/18/26 04:34 AM
HOA's
by Terl9999 - 09/18/26 04:12 AM
Football
by Terl9999 - 09/18/26 02:42 AM
Flags
by Terl9999 - 09/15/26 10:03 PM
September 15th Battle of Britain Day.
by RedToo - 09/15/26 08:06 PM
Population Patterns
by PanzerMeyer - 09/15/26 03:43 PM
"Problem occurred in connection"
by F4UDash4 - 09/14/26 01:41 PM
Popular Topics(Views)
7,069,338 SAM Simulator
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 8.0.1