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 


Paused or in-game sleep function

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Gi@nnis
Cheater
Reputation: 1

Joined: 26 Oct 2013
Posts: 32
Location: Greece

PostPosted: Sat Dec 27, 2014 5:31 am    Post subject: Paused or in-game sleep function Reply with quote

Hello,
I was wandering if it is possible to detect when a game is paused (menu etc not speed hack paused). I'm trying to create a regeneration script into my table, but the problem is that the script keeps working when the game it pause.
Even better, if it possible to find the in-game sleep function. I assume something like that has got to exist, but I don't have a clue how to locate it. Any advice - pointer is welcome.

Thanks in advance.
Back to top
View user's profile Send private message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Sat Dec 27, 2014 7:09 am    Post subject: Re: Paused or in-game sleep function Reply with quote

Gi@nnis wrote:
Hello,
I was wandering if it is possible to detect when a game is paused (menu etc not speed hack paused). I'm trying to create a regeneration script into my table, but the problem is that the script keeps working when the game it pause.


You could try finding a boolean value that is true when paused and false otherwise,or vice-versa,in other words,a value that is either 1 or 0,and that changes when the 'paused' state changes.

Then from your script,check if the game is paused(compare that value with 1 or 0,and take appropriate actions).

Gi@nnis wrote:
Even better, if it possible to find the in-game sleep function. I assume something like that has got to exist, but I don't have a clue how to locate it. Any advice - pointer is welcome.


You could scan for referenced strings,and look for some strings that are in the pause menu,then analyse the code a bit to find the start of the pause function,this does not always work.
Back to top
View user's profile Send private message
Gi@nnis
Cheater
Reputation: 1

Joined: 26 Oct 2013
Posts: 32
Location: Greece

PostPosted: Sat Dec 27, 2014 4:32 pm    Post subject: Re: Paused or in-game sleep function Reply with quote

rnib wrote:

You could try finding a boolean value that is true when paused and false otherwise,or vice-versa,in other words,a value that is either 1 or 0,and that changes when the 'paused' state changes.

Then from your script,check if the game is paused(compare that value with 1 or 0,and take appropriate actions).

I just tested it, and it works fine!Very Happy
Really straight forward and simple, I couldn't hope for a better answer. I wander why I didn't think of that ...

Quote:

You could scan for referenced strings,and look for some strings that are in the pause menu,then analyse the code a bit to find the start of the pause
function,this does not always work.

I didn't find the sleep function, but I did find a value that get scaled with the game speed, so now I can scale my sleep time and call the windows kernelbase.sleep.

Thanks, you've been very helpful!Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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