Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Gamepadbuttons to change ingame value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
MrRonny6
How do I cheat?
Reputation: 0

Joined: 31 Mar 2015
Posts: 2
Location: Deutschland

PostPosted: Fri Aug 19, 2016 10:46 am    Post subject: Gamepadbuttons to change ingame value Reply with quote

Okay, I'm not entirely sure if this is the right place for this as I don't know whether it is even possible, but this is my plan:
I want to use a DirectInput Gamepad to change values in game. For that I want to setup my TH8RS to change gears in Need for Speed Underground 2. Usually I do this by using the program HIDMacros and Hotkeys in CE pointed at the value for my cars gear. However the game seems to be hogging the gamepad, as in only allowing itself to read off the state of the buttonpresses. The hotkeys still work via the keyboard, but that pretty much defeats the purpose of this script.
Now what would be helpful is either a way to hide the gearstick from the game but let it access my wheel, or a way to use a lua script to work with the keypresses.
While ingame, Windowses joy.cpl-controlpanel-thingy cannot read the keystates of the controller however that happens everytime its window is not in focus, so that should not really matter.
If you have managed to keep interested in my question even after this quite long explanation, have an idea to make this work, want to move this thread somewhere else or have any other reason to reply, feel free to do so!
Back to top
View user's profile Send private message
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Fri Aug 26, 2016 2:23 pm    Post subject: Reply with quote

Your tackling this problem backwards. Hold the button that you want and "hard pause" the game search for a value of 1 let go of the button and resume from hard pause search 0. Rinse and repeat till you find the controller input for the game.


Right click on controller input memory entry and find out what access this code.
Disable opcodes till button no longer works. Now create an injection on that opcode for your custom code.

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites