Thruster/wheel "Controller" possible?

What I mean is, would it be possible to make a SENT which had the power to permit or deny standard Gmod Thrusters and Wheels from moving when you hit their numpad key? I don’t want to change how the numpad works, though.

You have to overwrite the numpad hook for that object. I.e., get the normal function that occurs when you press the numpad key for the thruster, recreate it in another script, then re-register it, I believe.

function example_function( pl, arg1 )
print( pl:Name()…" called the example function with the argument: "…arg1 )

– Register the function with the numpad library.
numpad.Register( “example_function”, example_function )

– Register the impulse with the numpad library.
numpad.OnDown( player.GetByID( 1 ), 0, “example_function”, “Pressed” )

There’s the example numpad stuff from the Wiki. What you need to do is copy the thruster function and register it as numpad.Register did with the same name as the thruster.OnDown normally calls. You don’t need numpad.OnDown anywhere.

Does any of that make sense?

It… Kind of does. That’s not a way I want to go, though… Would it be possible for the “Controller” to simply change the Thruster SENT’s Force or the Wheel SENT’s Torque to 0 when it wants to disable it?

Why would you turn the thruster on if you didn’t want it to move? What it seems that your asking is can I press a numpad key to make a thruster stop and go and it’s already setup like that.

I know it sounds convoluted, but ideally I want A SENT that didn’t change how the numpad worked, but could be linked to a Thruster or Wheel, and from then on the Thruster or Wheel don’t work unless you press the numpad key AND the Controller SENT allows it.

No I don’t see how you could do that without recoding the thrusters and wheels themselves. But you might try to make the entity sleep. I’m not sure if that will work but its worth a shot.

Making new thrusters/wheels is better than reworking the numpad. Still not ideal, but oh well.