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 create a loop in auto assemble?

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

Joined: 09 Feb 2024
Posts: 1

PostPosted: Fri Feb 09, 2024 12:10 am    Post subject: How to create a loop in auto assemble? Reply with quote

While enabled I want it to loop and not while off.

[ENABLE]

[[[WorldChrMan]+40]+28]+80:

readmem([[[[[WorldChrMan]+40]+38]+18]+28]+80,12)

[DISABLE]
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4307

PostPosted: Fri Feb 09, 2024 1:59 am    Post subject: Reply with quote

You can't... unless you created a thread and wrote the code to copy the data yourself, but that's annoying and weird.

Use Lua:
Code:
{$lua}
if syntaxcheck then return end

if myUniqueTimerName then myUniqueTimerName.destroy(); myUniqueTimerName = nil end

[ENABLE]

myUniqueTimerName = createTimer()
myUniqueTimerName.Interval = 100
myUniqueTimerName.OnTimer = function(t)
  local bt = readBytes('[[[[[WorldChrMan]+40]+38]+18]+28]+80', 12, true)
  writeBytes('[[[WorldChrMan]+40]+28]+80', bt)
end

[DISABLE]

_________________
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
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25298
Location: The netherlands

PostPosted: Fri Feb 09, 2024 2:40 am    Post subject: Reply with quote

or:
add 2 memory records of the type array of byte with 12 length

one named dest with address [[[WorldChrMan]+40]+28]+80
one named source with address [[[[[WorldChrMan]+40]+38]+18]+28]+80

then freeze dest and change the value to (source)

now CE will constantly set the value of dest to the value of source


(tip: use the pointer setup for setting the address, it's internally faster than using the [[[xxxx]]] notation)

i'll see about adding a "Activate sets value: " special option to memoryrecords so it can be part of a table

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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