programming in T.A.R.G.E.T (which uses C)
Hello,
I have got programmable joysticks.
T.16000M - Ambidextrous Joystick - PC USB | Thrustmaster
Don't ask me why, but I have two of these to use as dual sticks in games. It seems to have it's advantages. For one, I can program multiple things to happen on one axis. This give me a huge advantage in dogfights. Also I can program the entire keybord letters to my base buttons. No need for keybord... :)
But I lack the logic thinking to get my code completed.
I have multiple issues, and will adress them one at a time.
My first problem is my POV. That's the little mini thumbjoystick on top of a joystick for your Point of View camera ingame. The thing usually used for switching camera positions.
The trouble is this: In UPRIGHT position it executes both my UP and my RIGHT programmed stuff. Instead of a different third thing. My Conclusion is that UPRIGHT doens't exist as such, and Software just see that both UP and RIGHT are true, and execute code that says: When both are true, it's an in-between.
Works ingame, but I need a code that does something else.
'Cause Up might be 'missiles' , Right might be 'Start Chat', and I don't need missiles fired and chatting while doing UPRIGHT 'Dock to friendly Ship'
for short: I need a working code that says: When Up=True, and Right =True, both are not executed, and execute ActKey '2' (for example)
in my main file I got
Code:
MapKey(&T16001, H1U, Center_View);
MapKey(&T16001, H1R, View_Right);
In my ttm file (where my definitions are grabbed from) I came up with:
Code:
define Center_View '1'
define View_Up '2'
define View_Right '3'
In my main file I first had:
Code:
MapKey(&T16001, H1UR, View_Up);
There was no H1UR, so nothing happened.
Then I tried
Code:
MapKey(&T16001, H1U+H1R, View_Up);
Then I tried
Code:
if
{Center_View=1
&
View_Right=1;
}
{Center_View=0
View_Right=0
ActKey ('2');
}
now I tried:
Code:
while (MapKey(&T16001, H1U, Center_View) MapKey(&T16001, H1R, View_Right));
do
{Center_View=0
View_Right=0
Actkey('2')
};
and I get '(' and ')' errors all the time about the first line. I tried adding and deleting '(' 's and ')' 's the whole time, and keep getting errors about them
Not sure when to use too, I tried these too.
I also have no idea if this is the code I am looking for to do what I need it to do. My study in C and TARGET doesn't give me enough clues about the correct syntaxis.
Do I need flagging stuff?
http://ts.thrustmaster.com/eng/index...&pid=285&cid=5
here is the program and the manual of TARGET (down below at the download stuff)
and some more ps: The [code/code stuff isn't working in preview]