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 


How to asign mouse buttons?

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

Joined: 03 Jan 2014
Posts: 3

PostPosted: Tue Jan 07, 2014 5:04 am    Post subject: How to asign mouse buttons? Reply with quote

Greetings, I'm a newbie so I ask your help. My question is: I need to assign some functions to the right mouse button. I want to be able to climb straight up in Fly mode, to be specific. My game is BioShock Infinite and I already have everything I need, I mean CT scripts. I figured out how to assign simple buttons but not mouse buttons. Can I do this in Cheat Engine directly or should I go deeper and work with CT file?
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Tue Jan 07, 2014 7:40 am    Post subject: Reply with quote

You can make a timer via LUA, that checks if right mouse button is clicked, and then increase your Y offset (if right mouse button is clicked).
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Jetset
How do I cheat?
Reputation: 0

Joined: 03 Jan 2014
Posts: 3

PostPosted: Tue Jan 07, 2014 10:13 am    Post subject: Reply with quote

[quote="DaSpamer"]You can make a timer via LUA, that checks if right mouse button is clicked, and then increase your Y offset (if right mouse button is clicked).[/quote]

Is there an easy way to do it? I have no Idea how to do a timer and LUA scares me too x)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Jan 07, 2014 1:19 pm    Post subject: Reply with quote

If you're not comfortable with LUA, you can use assembly; just find the address that handles the right mouse button...then do as DaSpamer says and write a script that will increase your Y axis when the right mouse button is being pushed.

To find the address that holds the mouse button, you can try searching for 3F800000 (float 1.0) when mouse button is pressed and 0 when not pressed. Or, simply search for changed/unchanged, increased/decreased etc. until you've found it. You may end up with multiple addresses, but that shouldn't matter...you only need one of them.

When you have the address for the right mouse button and the address for Y axis, find a good injection point for each...by using an instruction that accesses each value (so, you will end up with two instructions...one that accesses the right mouse button and one that accesses the Y axis). When you have your two instructions...make sure they do not access any other addresses. If the instruction(s) access more than one address, simply find a different instruction to use (or) filter out all of the addresses that do not apply. If you need help with that, just ask.

Once you have your two injection points and all of the filtering issues have been sorted, simply combine your scripts and write a conditional jump that checks if the right button is being pressed...if it is, increase Y axis...if it isn't, jmp originalcode.

You can write it so that your character floats up, incrementally, when the mouse button is pressed, or, immediately teleports to a given elevation when pressed etc.
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 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