Posted: Thu Jul 11, 2019 3:47 pm Post subject: [Help]Scripting help with stopping an adress offset or value
I don't know if there is a way to make a script to stop an adress value or freeze it when another adress value reach certain value, any hint will help me out!
cmp [otheraddres], certain_value
je skipstuff
// otherwise do stuff to change address's value here
skipstuff:
// ... other stuff after possibly changing it
obviously with asm the exact code depends on the existing exact code used by the game and addresses etc.
With lua you could do something like
Code:
{$lua}
if syntaxcheck then return end -- don't run code when editing/saving
[ENABLE]
local control = AddressList.getMemoryRecordByDescription("Controlling record")
local trigger_value = 'the value' -- as a string
local controlled = AddressList.getMemoryRecordByDescription("Controlled")
control_timer = createTimer()
control_timer.Interval = 10
control_timer.OnTimer = function()
-- (un)freeze based on control
controlled.Active = control.Value == trigger_value
end
[DISABLE]
control_timer.destroy()
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