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 


controllerComboHandler v1.00 for CE6.5.1 and newer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting -> Lua Extensions
View previous topic :: View next topic  
Author Message
mgr.inz.Player
I post too much
Reputation: 148

Joined: 07 Nov 2008
Posts: 4187
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jun 03, 2016 3:15 pm    Post subject: controllerComboHandler v1.00 for CE6.5.1 and newer Reply with quote

Initial release.


Features:
Detects twelve buttons:
- standard A B X Y (aka cross circle square triangle),
- directional pad DL DD DL DR (up, down, left and right)
- LB RB buttons (aka R1 and R2)
- LA RA buttons - left stick press and right stick press (aka L3 R3)

Detects combinations of pressed buttons: e.g. any two or more buttons pressed at the same time

Detects collisions. So you won't accidentally trigger other combo.




You can define combo by simply calling addNewCombo function with a string, e.g. "AB , BY , AX"

"AB , BY , AX" means - press A and B, then release buttons, then press B and Y, then release buttons, then press A and X, then release buttons.

"AB , BY , AX" is a different combo than "AB , BY , ABX", and executing the first combo won't activate the second, and vice versa.




There is "norelease" option. If you want smooth combo, something like "press DL, then hit A, then Y, then X, then B while DL still pressed, then release all buttons" you can define combo as "norelease DLA , DLY , DLX , DLB"



"norelease DLA , DLY , DLX , DLB" is a different combo than "DLA , DLY , DLX , DLB"
as mentioned earlier first is "press DL, then A, then Y, then X, then B while DL still pressed, release buttons"
the second is "press DL and A, then release buttons, press DL and Y, ..." and so on

Hmm, maybe it would be better to change option name from "norelease" to "smooth" ?




Usage:
Code:
controllerComboHandler.registeredCombos = {} -- clean

controllerComboHandler.addNewCombo(  'comboname'  ,  functionToCall  ,  "comboString" )

controllerComboHandler.addNewCombo(  'comboname'  ,  MemoryRecordActivationToggle  ,  "comboString" )


controllerComboHandler.startListening() - starts controllerComboHandler

controllerComboHandler.stopListening() - stops controllerComboHandler





Example:

Code:
function myFunc()
  -- something here
end


memoryRecord = getAddressList().getMemoryRecordByDescription('Stamina')

controllerComboHandler.registeredCombos = {}

controllerComboHandler.addNewCombo('renovate equipped weapon', myFunc, "DLX , DLB , DLX")
controllerComboHandler.addNewCombo('infinite stamina', memoryRecord, "DLX , DLB , DLB , DLX")

controllerComboHandler.startListening()



controllerComboHandler.lua
 Description:

Download
 Filename:  controllerComboHandler.lua
 Filesize:  8.11 KB
 Downloaded:  571 Time(s)


_________________
Back to top
View user's profile Send private message MSN Messenger
mgr.inz.Player
I post too much
Reputation: 148

Joined: 07 Nov 2008
Posts: 4187
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jun 09, 2016 4:20 pm    Post subject: Reply with quote

From other thread:
predprey wrote:
i could probably make a GUI for mgr.inz's extension and add an entry just below the CE's Set Hotkey option but note the increased overhead of pass through the lua engine.

of course the best of both world would be to port or mimic mgr.inz's extension in pascal and redesign CE's hotkey form to accomodate the two different styles of setting hotkeys for gamepad and keyboard, but my skill level is not up to par, yet Rolling Eyes

TLDR; i'll do up a GUI for mgr.inz's controllercombo extension sooner but probably later Laughing

Creating a GUI, it's on my "to do" list since few weeks... but

1) getXBox360ControllerState, this is a new feature. It requires CE6.5.1 and most people do not update to recent version. Just because. They clearly do not watch CE bug-tracker and CE changes on GitHub.

2) Surprisingly, there's no feedback on current version of controllerComboHandler extension.

3) Not much free time.




About "increased overhead of pass through the lua engine". Those games are using Lua (massive) scripts:
- Shadow Warrior
- Legend of Grimrock
- Don't Starve
- Crysis
- Painkiller
- STALKER series


So, one thread for controllerComboHandler is not a big deal.

_________________
Back to top
View user's profile Send private message MSN Messenger
predprey
Master Cheater
Reputation: 15

Joined: 08 Oct 2015
Posts: 370

PostPosted: Fri Jun 10, 2016 1:45 am    Post subject: Reply with quote

IKR, TFW no one seems to notice our extensions buried here Laughing
i'm sure it will gain traction after a while.

my mental yardstick for overhead and cpu load still isn't calibrated from experience yet. still a greenhorn scriptkiddie Laughing
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 Lua Scripting -> Lua Extensions 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