stop on release for hotkey ??

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
User avatar
oyyzj
Expert Cheater
Expert Cheater
Posts: 122
Joined: Mon Mar 13, 2017 4:14 pm
Reputation: 52

stop on release for hotkey ??

Post by oyyzj »

Hi there.

I know there is option at CE setting for hotkey which has the function "stop on release"

Image

-----------------------------------------------------------------------------------------

Is there any addon for adress Hotkey to have the same "stop on release" function?

Image


Thanks in advance.

Keks4Gaming
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Feb 27, 2022 12:20 pm
Reputation: 27

Re: stop on release for hotkey ??

Post 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

User avatar
VampTY
Table Makers
Table Makers
Posts: 809
Joined: Tue Mar 05, 2019 10:52 am
Reputation: 1050

Re: stop on release for hotkey ??

Post 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! :P

User avatar
oyyzj
Expert Cheater
Expert Cheater
Posts: 122
Joined: Mon Mar 13, 2017 4:14 pm
Reputation: 52

Re: stop on release for hotkey ??

Post 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.

Keks4Gaming
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Feb 27, 2022 12:20 pm
Reputation: 27

Re: stop on release for hotkey ??

Post 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

User avatar
oyyzj
Expert Cheater
Expert Cheater
Posts: 122
Joined: Mon Mar 13, 2017 4:14 pm
Reputation: 52

Re: stop on release for hotkey ??

Post by oyyzj »

Thanks. Working

Blackrosemmt
Noobzor
Noobzor
Posts: 14
Joined: Wed Jul 17, 2019 8:07 pm
Reputation: 0

Re: stop on release for hotkey ??

Post by Blackrosemmt »

Image

@Keks4Gaming
Why I'm having this error can you please help :roll: :roll:

Keks4Gaming
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Feb 27, 2022 12:20 pm
Reputation: 27

Re: stop on release for hotkey ??

Post 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

Post Reply

Who is online

Users browsing this forum: No registered users