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 


Unstable hotkeys or....

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Mon Aug 10, 2020 1:26 am    Post subject: Unstable hotkeys or.... Reply with quote

So i noticed when i hold a hotkey to do an attack it does it rapidly which is good but then after like 5-6 seconds it pauses for a seond and then continues.
I have excluded CE and the game from WDefender.
Can this be related to LUA script i use or is something else causing the hotkeys not to respond in specific interval ...l even if the lua timer is 1 or 16 etc

Why it will work normal and suddenly pause after say 7 second , 5 seconds - CE wont detect a hotkey press or AGAIN it can be my fault - pc system or something else

My question is are hotkeys pausing at specific time ? Because sometimes i notice they wont react when i press them

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Aug 10, 2020 1:44 am    Post subject: Reply with quote

Timers are not accurate and are subject to messagestorm delays

Either use CE hotkeys or use a thread in which you poll for the keys

and what keys are you using?

_________________
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
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Mon Aug 10, 2020 2:05 am    Post subject: Reply with quote

Dark Byte wrote:
Timers are not accurate and are subject to messagestorm delays

Either use CE hotkeys or use a thread in which you poll for the keys

and what keys are you using?


i guess its the timers then... i tried thread but result was same.. which is strange.

Code:



[ENABLE]
{$Lua}
    VK_PAD_A = 0x5800
    VK_PAD_B = 0x5801
    VK_PAD_X = 0x5802
    VK_PAD_Y = 0x5803
    VK_PAD_RSHOULDER = 0x5804
    VK_PAD_LSHOULDER = 0x5805
    VK_PAD_LTRIGGER = 0x5806
    VK_PAD_RTRIGGER = 0x5807
    VK_PAD_DPAD_UP = 0x5810
    VK_PAD_DPAD_DOWN = 0x5811
    VK_PAD_DPAD_LEFT = 0x5812
    VK_PAD_DPAD_RIGHT = 0x5813
    VK_PAD_START = 0x5814
    VK_PAD_BACK = 0x5815
    VK_PAD_LTHUMB_PRESS = 0x5816
    VK_PAD_RTHUMB_PRESS = 0x5817
    VK_PAD_LTHUMB_UP = 0x5820
    VK_PAD_LTHUMB_DOWN = 0x5821
    VK_PAD_LTHUMB_RIGHT = 0x5822
    VK_PAD_LTHUMB_LEFT = 0x5823
    VK_PAD_LTHUMB_UPLEFT = 0x5824
    VK_PAD_LTHUMB_UPRIGHT = 0x5825
    VK_PAD_LTHUMB_DOWNRIGHT = 0x5826
    VK_PAD_LTHUMB_DOWNLEFT = 0x5827
    VK_PAD_RTHUMB_UP = 0x5830
    VK_PAD_RTHUMB_DOWN = 0x5831
    VK_PAD_RTHUMB_RIGHT = 0x5832
    VK_PAD_RTHUMB_LEFT = 0x5833
    VK_PAD_RTHUMB_UPLEFT = 0x5834
    VK_PAD_RTHUMB_UPRIGHT = 0x5835
    VK_PAD_RTHUMB_DOWNRIGHT = 0x5836
    VK_PAD_RTHUMB_DOWNLEFT = 0x5837



function Char5AtkFix(sender)

if readInteger("_MovesATKs+10")==0
then

writeInteger("entities_action_proxy+0",115000) --STANDING
writeInteger("entities_action_proxy+8",0) --STANDING
writeInteger("entities_action_proxy+10",0) --TAUNT Source
writeInteger("entities_action_proxy+18",0) --TAUNT Target
writeInteger("entities_action_proxy+20",0) --L2 Source
writeInteger("entities_action_proxy+28",0) --L2 Target
end





if isKeyPressed(VK_PAD_X) and isKeyPressed(VK_PAD_DPAD_UP)
then

writeFloat("_MovesATKs+C",0)
writeInteger("[_movesmod]+69AB0",readInteger("_MovesATK")+0x0)
writeInteger("[_movesmod]+69B10",0x0)
writeInteger("[_movesmod]+69D78",0x0)
writeInteger("_MovesATKs+10",1)
end


if readInteger("_MovesATKs+10")==1
then
local starttime=os.clock()
while os.clock()<starttime+0.2 do
writeInteger("entities_action_proxy+8",115800) --F50
writeInteger("_MovesATKs+10", 0)
writeFloat("_MovesATKs+C",0)
end end


if isKeyPressed(VK_PAD_X) and isKeyPressed(VK_PAD_DPAD_LEFT)
then
writeFloat("_MovesATKs+C",0)
writeInteger("[_movesmod]+69AB0",readInteger("_MovesATK")+0x0)
writeInteger("[_movesmod]+69B10",0x0)
writeInteger("[_movesmod]+69D78",0x0)
writeInteger("_MovesATKs+10",2)

end


if readInteger("_MovesATKs+10")==2
then
local starttime=os.clock()
while os.clock()<starttime+0.2 do
writeInteger("entities_action_proxy+8",115810)
writeInteger("_MovesATKs+10", 0)
writeFloat("_MovesATKs+C",0)
end end


if isKeyPressed(VK_PAD_X) and isKeyPressed(VK_PAD_DPAD_DOWN)
then
writeFloat("_MovesATKs+C",0)
writeInteger("[_movesmod]+69AB0",readInteger("_MovesATK")+0x0)
writeInteger("[_movesmod]+69B10",0x0)
writeInteger("[_movesmod]+69D78",0x0)
writeInteger("_MovesATKs+10",3)

end


if readInteger("_MovesATKs+10")==3
then
local starttime=os.clock()
while os.clock()<starttime+0.2 do
writeInteger("entities_action_proxy+8",115151)
writeInteger("_MovesATKs+10", 0)
writeFloat("_MovesATKs+C",0)
end end


if isKeyPressed(VK_PAD_X) and isKeyPressed(VK_PAD_DPAD_RIGHT)
then
writeFloat("_MovesATKs+C",0)
writeInteger("[_movesmod]+69AB0",readInteger("_MovesATK")+0x0)
writeInteger("[_movesmod]+69B10",0x0)
writeInteger("[_movesmod]+69D78",0x0)
writeInteger("_MovesATKs+10",4)

end


if readInteger("_MovesATKs+10")==4
then
local starttime=os.clock()
while os.clock()<starttime+0.2 do
writeInteger("entities_action_proxy+8",115820) --F50
writeInteger("_MovesATKs+10", 0)
writeFloat("_MovesATKs+C",0)
end end






end
Char5=createTimer()
Char5.interval = 4; -- 1 = 1ms, 100 = 100ms, 1000 = sec; 16ms --> ~60 fps
Char5.onTimer = Char5AtkFix

[DISABLE]
{$Lua}
Char5.destroy()



Am i doing things wrong ? For days i want to make a stable hotkeys script so they respons always on press..

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Aug 10, 2020 2:16 am    Post subject: Reply with quote

go to settings->hotkeys, and set keypoll interval to 1
or setGlobalKeyPollInterval(1)


the keypad state will only be updated when ce's hotkeyhandler has queried it

_________________
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


Last edited by Dark Byte on Mon Aug 10, 2020 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Mon Aug 10, 2020 2:18 am    Post subject: Reply with quote

Dark Byte wrote:
go to settings->hotkeys, and set keypoll interval to 1


tried alredy but resutlt is same. Works like 2-3 times then the 4th time i press the hotkey it will not react.

_________________
I am the forgotten one the dead one.


Last edited by Meiyoh on Mon Aug 10, 2020 2:23 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Aug 10, 2020 2:20 am    Post subject: Reply with quote

try 100 or 30. Do not set it to high, and perhaps not to low in case the hardware can't handle it.

And try using createHotkey instead of isKeyPressed, that way the hotkeyhandler thread and your isKeyPressed doesn't compete

_________________
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
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Mon Aug 10, 2020 2:27 am    Post subject: Reply with quote

Dark Byte wrote:
try 100 or 30. Do not set it to high, and perhaps not to low in case the hardware can't handle it.

And try using createHotkey instead of isKeyPressed, that way the hotkeyhandler thread and your isKeyPressed doesn't compete


Never heard of CreateHotkey how can i use it ?

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Aug 10, 2020 2:41 am    Post subject: Reply with quote

example:
Code:

hk=createHotkey(function()
  writeFloat("_MovesATKs+C",0)
  writeInteger("[_movesmod]+69AB0",readInteger("_MovesATK")+0x0)
  writeInteger("[_movesmod]+69B10",0x0)
  writeInteger("[_movesmod]+69D78",0x0)
  writeInteger("_MovesATKs+10",4) 
end, VK_PAD_X, VK_PAD_DPAD_RIGHT)


it's subject to the global hotkey delay, but you can do
Code:

hk.DelayBetweenActivate=1 --for 1 millisecond

and combine that with setGlobalKeyPollInterval(1) or so

_________________
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
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Mon Aug 10, 2020 2:45 am    Post subject: Reply with quote

Dark Byte wrote:
example:
Code:

hk=createHotkey(function()
  writeFloat("_MovesATKs+C",0)
  writeInteger("[_movesmod]+69AB0",readInteger("_MovesATK")+0x0)
  writeInteger("[_movesmod]+69B10",0x0)
  writeInteger("[_movesmod]+69D78",0x0)
  writeInteger("_MovesATKs+10",4) 
end, VK_PAD_X, VK_PAD_DPAD_RIGHT)


it's subject to the global hotkey delay, but you can do
Code:

hk.DelayBetweenActivate=1 --for 1 millisecond

and combine that with setGlobalKeyPollInterval(1) or so


Thank you Eric always helpful and good! God Bless you I am gonna try this and go read more on LUA.

Ok i see i put it inside timer loop which will cause Crash to CE.
HAHA
thanks

_________________
I am the forgotten one the dead one.


Last edited by Meiyoh on Mon Aug 10, 2020 3:22 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Aug 10, 2020 3:19 am    Post subject: Reply with quote

hk.destroy() will delete it
_________________
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
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 402

PostPosted: Mon Aug 10, 2020 3:22 am    Post subject: Reply with quote

Dark Byte wrote:
hk.destroy() will delete it


yes. Thanks seems more stable gonna rewrite stuff now much much more stable.

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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