 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
weetepin How do I cheat?
Reputation: 0
Joined: 26 Jul 2023 Posts: 1
|
Posted: Thu Oct 23, 2025 6:09 pm Post subject: Changing multiple addresses at once to different values? |
|
|
Hi there, I'm wondering if there's a convenient way to change a series of addresses at the same time to different values, based on a single "parent" value.
So for example, if I set one value (a string) to "default", I need it to change four other addresses to different, pre-defined values. And then if I change it to something else, use another set of values. How would I go about doing this?
|
|
| Back to top |
|
 |
C1aref5 Newbie cheater
Reputation: 0
Joined: 20 Feb 2025 Posts: 11
|
Posted: Sat Dec 13, 2025 5:41 pm Post subject: |
|
|
You create one parent value (string or dropdown)
When it changes, Lua writes predefined values to multiple addresses
Example (practical)
Assume:
Parent record name: "Mode"
Child addresses: addr1, addr2, addr3, addr4
local modes = {
default = {
addr1 = 100,
addr2 = 200,
addr3 = 1,
addr4 = 0
},
aggressive = {
addr1 = 500,
addr2 = 999,
addr3 = 0,
addr4 = 1
}
}
local parent = getAddressList().getMemoryRecordByDescription("Mode")
parent.OnValueChanged = function(memrec)
local v = memrec.Value
local m = modes[v]
if not m then return end
writeInteger("addr1", m.addr1)
writeInteger("addr2", m.addr2)
writeInteger("addr3", m.addr3)
writeInteger("addr4", m.addr4)
end
--
Cheat engine tutorial
https://cheatengine.org/forum/viewtopic.php?t=623780
|
|
| Back to top |
|
 |
|
|
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
|
|