Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4185794 - 10/24/15 09:37 PM What is different about stock tmc/ttm files?  
Joined: Aug 2012
Posts: 103
Moved_on Offline
Member
Moved_on  Offline
Member

Joined: Aug 2012
Posts: 103
I've had a look through this forum and haven't found an answer already posted, so....

I finally got around to explore what Target has to offer through scripts with a view to mirroring the arrangement I had on my old Cougar created with Foxy. I read through the documentation and thought I had a pretty good understanding, borrowed extensively from the stock scripts provided by TM to help me learn and produced my first, albeit incomplete tmc/ttm, which complies without error. One thing I am struggling to understand is when I press and hold a button whilst running a stock script, e.g. DCS FC2 Mig29, it generates repeated characters for the duration of the hold and only issues the key release on physical button release. Using the old Foxy vernacular, much the same as the /P and /R command switches.

My own script, however, with the exact same syntax, only the macro name is different, generates the key press with an immediate key release [1ms] later irrespective of the button being physically released. There is nothing else in the stock file I can see being initialised that would account for this result.

My main reason for asking is I wish to replicate the behaviour produced by the stock script, i.e. repeating characters on button press that end on release. I am aware of DOWN+, UP+ and MapKeyR, but in truth keep running into compile errors when I introduce these to my script and trying to keep things simple to start. I have copied extracts from relevant tmc/ttm files below and really cannot see why they produce different results. Anyone able to shed any light on this?

Many thanks in advance.

++++++++++++++++++++++++++++++++++++++++
The stock tmc (DCS FC2 Mig29) reads:
MapKeyUMD(&Joystick, H2U,
_2__Beyond_Visual_Range_Mode,
_1__Navigation_Modes,
_7__Air_To_Ground_Mode);

where the ttm states:
define _7__Air_To_Ground_Mode USB[0x24] //(7) Air-To-Ground Mode
define _1__Navigation_Modes USB[0x1E] //(1) Navigation Modes
define _2__Beyond_Visual_Range_Mode USB[0x1F] //(2) Beyond Visual Range Mode

++++++++++++++++++++++++++++++++++++++++
My tmc reads:
MapKeyUMD(&Joystick, H2U,
MODE_BVR,
MODE_NAV,
MODE_A2G);

where the ttm states:
define MODE_A2G USB[0x24] // USB=7
define MODE_BVR USB[0x1F] // USB=2
define MODE_NAV USB[0x1E] // USB=1
++++++++++++++++++++++++++++++++++++++++

Inline advert (2nd and 3rd post)

#4185941 - 10/25/15 03:44 PM Re: What is different about stock tmc/ttm files? [Re: Moved_on]  
Joined: Aug 2012
Posts: 103
Moved_on Offline
Member
Moved_on  Offline
Member

Joined: Aug 2012
Posts: 103
In the interest of helping others, I found the resolution. A new day and fresh comparison of the files revealed an error in pasting the closing statement below at the end of my TMC file.

int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);

I had inserted all my commands after this statement. Correcting this silly mistake and all the issues disappeared.

#4185981 - 10/25/15 05:34 PM Re: What is different about stock tmc/ttm files? [Re: Moved_on]  
Joined: Mar 2007
Posts: 483
Aullido Offline
Member
Aullido  Offline
Member

Joined: Mar 2007
Posts: 483
The .tmc is your main file, from there other files can be called. .tmh stands for header files, this files can contain code. .tmm files are macro files where the commands can be store. Aside from the main files, the other types are the same for the compiler.

#4186939 - 10/27/15 06:25 PM Re: What is different about stock tmc/ttm files? [Re: Moved_on]  
Joined: Aug 2012
Posts: 103
Moved_on Offline
Member
Moved_on  Offline
Member

Joined: Aug 2012
Posts: 103
Hi Aullido,

Many thanks for the info. I think I'd got my head around the file structure, though didn't appreciate that code can be added to the tmh files too. I kind of figured these were off-limits to the user and guessing if I mess these up I'll be in a whole world of pain winkngrin

#4187128 - 10/28/15 12:41 AM Re: What is different about stock tmc/ttm files? [Re: Moved_on]  
Joined: Mar 2007
Posts: 483
Aullido Offline
Member
Aullido  Offline
Member

Joined: Mar 2007
Posts: 483
Don't do that, those .h files are restricted although you can copy them and modified to use at another directory. You can create your own .h files but don't mess with the originals or you would need to reinstall if something goes wrong.


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

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


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0