Page 1 of 1
stop on release for hotkey ??
Posted: Sat Mar 19, 2022 9:26 am
by oyyzj
Hi there.
I know there is option at CE setting for hotkey which has the function "stop on release"
-----------------------------------------------------------------------------------------
Is there any addon for adress Hotkey to have the same "stop on release" function?
Thanks in advance.
Re: stop on release for hotkey ??
Posted: Mon Mar 21, 2022 1:34 pm
by Keks4Gaming
Hey oyyzj,
i dont know if there is any Addon but you could write a Lua script for it.
there is a function "isKeyPressed" which returns true when the given key is pressed. So with some logic you could write a script that freezes, decrease or increase the value of an address as long as you hold the button.
Hope it helps.
Greetings Keks
Re: stop on release for hotkey ??
Posted: Mon Mar 21, 2022 6:33 pm
by VampTY
Hi,
Like you posted that hotkey printscreen, just paste this code into you Cheat Engine:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>56</ID>
<Description>"Speed"</Description>
<LastState/>
<Color>606060</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
luacall(speedhack_setSpeed(5))
[DISABLE]
luacall(speedhack_setSpeed(1))
</AssemblerScript>
</CheatEntry>
</CheatEntries>
</CheatTable>
Where is that "speedhack_setSpeed(5)" is pretty fast, set it to "2" or something or set it to "3.3" or "0", well you get the idea, then add a hotkey to it and there you go!
Re: stop on release for hotkey ??
Posted: Thu Mar 24, 2022 4:55 pm
by oyyzj
Hello there. thanks for Reply.
I'm looking for the stop on release function for hotkey of adress and not CE speedhack (which makes the whole game fast).
I have character speed adress e.g. "game.exe"+0815 (float) 1. If you press the hotkey bind to adress then set to 5 and return to 1 when you stop pressing. like that.
Re: stop on release for hotkey ??
Posted: Thu Mar 24, 2022 10:10 pm
by Keks4Gaming
So you want to make a sprint hack, ok. You can try the following:
-Click Memory View->Tools->Auto assemble
-Insert the code below and set speed and key variable to your preference
-Click File assign to current table
-activate the script
Code: Select all
{$lua}
[enable]
KILL_TIMER = false
fastSpeed = 5.0
slowSpeed = 1.0
hotkey = VK_SHIFT
function checkKeys(timer)
if KILL_TIMER then
t.destroy()
end
if isKeyPressed(hotkey) then
writeFloat("[game.exe+0815]", fastSpeed)
else
writeFloat("[game.exe+0815]", slowSpeed)
end
end
t = createTimer(nil)
timer_setInterval(t, 50)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)
[disable]
KILL_TIMER = true
Not tested, if something is not working tell me and i will see.
Greetings Keks
Re: stop on release for hotkey ??
Posted: Fri Mar 25, 2022 6:11 pm
by oyyzj
Thanks. Working
Re: stop on release for hotkey ??
Posted: Sat Jul 09, 2022 4:50 pm
by Blackrosemmt
@Keks4Gaming
Why I'm having this error can you please help
Re: stop on release for hotkey ??
Posted: Sun Jul 10, 2022 7:20 am
by Keks4Gaming
Hey Blackrosemmt,
are you trying to make a generic Trainer? Then there is already a form with this name.
Iam pretty sure this have nothing to do with the script i postet here.
Greetings Keks