"GetTrigger(KHand hand)" what???

in the joystick class, the member function GetTrigger(), how do i use this. I am using it in the following code:

if (m_FireStick->GetTrigger())
{
solenoid->Set(true);
solenoid->Set(false);
}

when i press the trigger, the code isn’t executing. what am i doing wrong

Uh… you’re setting it on then off imediately. Try this:


if (m_FireStick->GetTrigger())
{
solenoid->Set(true);
}else{
solenoid->Set(false);
}

the code in the brackets is fine. it runs when i use if(GetRawButton(button))

It doesn’t work when i use the GetTrigger(); do i need to use any paramiters because i know that in the templet or tool tip it says hand so i know that is fir the generic HID but do i need to insert anything. I dont get any build errors when I dont use paramiters.

Please ignore the poor spelling, there is a reason why i program on a computer…spell check :stuck_out_tongue:

~xtreampb~

Pitt Pirates 2642

How do you know it runs? It looks like it won’t have any noticeable effect. It turns on a solenoid output so briefly that there should be no time for a mechanical component to respond before it’s turned off again.

so are you saying that i need to use like a wait(0.5) before it set it to false again. I am changing it so fast because it is going to be out “plundger” and it needs to reload itself as fast as possible or else the other balls in quene will get jamed behind the launcher (especially if the person working the fire control doesn’t know what he/she is doing)