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 


Hotkey for toggling a value between 2 states?

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

Joined: 05 Mar 2020
Posts: 2

PostPosted: Thu Mar 05, 2020 6:29 pm    Post subject: Hotkey for toggling a value between 2 states? Reply with quote

Hey,

I'm new to Cheat Engine and I understand the basics of searching and filtering values. I've been experimenting with hotkeys and it works pretty well although I didn't find an option to make a value flip states back and forth when using a hotkey.

I've been trying to find a solution for hours, most posts I've found were about autoassembler and Luascripts. I don't understand which adress I'm supposed to use in these scripts, or why the adresses are even written the way they are.

The adress in the overview list is 01141320. When I type:

[ENABLE]
[01141320]
db 1

[DISABLE]
[01141320]
db 0

it gives me an error:

Error in line 2 ([01141320]) : This instruction can't be compiled.
When I click on the address it shows a different address: Gens.exe+211320. (It's an emulator).

I've tried to find a solution, but people are saying that a pointer scan needs to determine a static adress, even though my address never changes even after srestarting the emulator. Can somebody please tell me why I get this error and what adress I need to enter in the Autoassembler script for it to toggle between 2 states?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4722

PostPosted: Thu Mar 05, 2020 8:05 pm    Post subject: Reply with quote

Code:
[ENABLE]
01141320:
db 1

[DISABLE]
01141320:
db 0

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
steve159
How do I cheat?
Reputation: 0

Joined: 05 Mar 2020
Posts: 2

PostPosted: Fri Mar 06, 2020 4:13 am    Post subject: Reply with quote

Wow, thanks so much.

Can't believe it was a simple syntax error. I've seen examples with square brackets but the adresses there looked kinda funny. I'm so clueless. I started watching an in depth tutorial of Cheat engine on youtube, because I find it fascinating. Thanks for the quick help again.

Edit: The only thing that's bothering me now is that it toggles on and off very fast. Even if the button is held for fairly short period of time it sometimes toggles twice, and therefore reverts to the initial state. Same thing happens with freeze toggle hotkeys. Is there a way to stop the back toggling until the button is released and pushed again?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4722

PostPosted: Fri Mar 06, 2020 11:12 am    Post subject: Reply with quote

You can change the delay between hotkey activations somewhere in Edit -> Settings.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
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