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 


Cheat Engine Forum Index
PostGo back to topic
Dark Byte
Site Admin
Reputation: 468
Joined: 09 May 2003
Posts: 25712
Location: The netherlands

PostPosted: Sat Feb 12, 2022 9:11 am    Post subject:

If keypress works then it's simple

your luacode is likely in the same thread that handles keypresses, but doKeyPress releases the key before it continues, so when your luacode returns the keys are up, so the game doesn't see it

use keyDown and keyUp

Code:

{$luacode}
if shouldpresskey then
  keyDown(69)
  keyDown(22531)
else
  keyUp(22531)
  keyUp(69)
end
{$asm}

_________________
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
Post reviews:   Approve 1
Author Review
AylinCE
Review: Approve
Post reference:
ReviewPosted: Sat Feb 12, 2022 10:13 am


Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites