Sign in to follow this  

modding code to accept my gun controller input

This topic is 3664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi folks, I have a gun controller prototype that is pretty cool. I want to use it in a mod, preferably BF2. The system mouse-cursor is line of sight...I want the target reticle (or no reticle is fine) to appear wherever the mouse coordinates are set by my parent c++ program. Can anyone suggest, short of learning how to develop a game, the most efficient means to doing this? GR

Share this post


Link to post
Share on other sites
The hardest, but probably most elegant and useful way would be to create a mouse driver for it. If you want to do this you'll need to get hold of the Windows DDK (which is on MSDN somewhere). Then once you've got this working you can use your controller in any game you want.

Another option may be to intercept Direct Input calls and modify the mouse coordinates, this article may be of some help. This is the kind of thing that may set off a game's anti-cheat protection however (as an Aimbot would do a similar thing).

Actually simply finding out how Aimbots work would be useful. I'm sure you can find plenty of info on the net (as well as some sample code you could modify).

Share this post


Link to post
Share on other sites
>>Then once you've got this working you can use your controller in any game you want.

Thanks for the reply. Its a good start. However, most games if you move the mouse controller, the center reticle doesn't change (it's centered) the POV does in FPS. What has to change in the game so that if I point here and there with my controller the gun reticle will go there without changing the POV. In other words histrocially FPS games have bundled direction of fire and direction of movement together. This concept would unbundle them, where you would have to move with one control mechanism and aim the gun with another...Furthermore, my controller input is already sensed by Joint Ops (for example) - anywhere I point, the game interprets this as mouse input. What ends up happening is I can control the POV with the gun controller but not where the gun is aimed. I've tried mouse look with JO but no luck so far. Is there a different game that would allow me to utilize the free look approach better?

Share this post


Link to post
Share on other sites
Ahh sorry, misread your first post. There's no simple way to do what you want if you want to play with that kind of thing your best option would be to get a game that is moddable (such as HL2) and write a mod that allows you to target independent of where you are looking. Precisely how you'd accomplish this depends upon the game.

Share this post


Link to post
Share on other sites

This topic is 3664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this