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 


Creating and attaching a constant timer to a game.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Mon Apr 04, 2016 11:12 am    Post subject: Creating and attaching a constant timer to a game. Reply with quote

I have three questions:
1. How to create a timer every time when the game starts, not in Lua but in ASM?

2. If I want to constantly checking some memory addresses while the game is running, and then do some actions based on the results, how do I do that?

3. As an alternative, can all the above be done in Lua? I don't know Lua very well, but I just know even less about assembly language. I wish I could use Lua instead of ASM. Sad
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Apr 04, 2016 5:35 pm    Post subject: Reply with quote

Code:
mytimer=createTimer(nil, false)
mytimer.Interval=1000
mytimer.OnTimer=function(timer)
  if readInteger("address") < 100 then
    writeInteger("address", 100)
  end
end
mytimer.Enabled=true
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Mon Apr 04, 2016 9:33 pm    Post subject: Reply with quote

Zanzer wrote:
Code:
mytimer=createTimer(nil, false)
mytimer.Interval=1000
mytimer.OnTimer=function(timer)
  if readInteger("address") < 100 then
    writeInteger("address", 100)
  end
end
mytimer.Enabled=true


Got it, read and write integers... I should have known that. Very Happy

Thanks Zaner as usual. 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 -> 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