temponamo How do I cheat?
Reputation: 0
Joined: 13 Apr 2025 Posts: 7
|
Posted: Sun Apr 13, 2025 7:15 am Post subject: Disable hotkeys when disabling group |
|
|
Hello, I'm pretty new to cheat engine, but I have managed to create the basic scripts like one-hit kill and enemies teleporting to player. I also have the pointers to player X Y and Z coordinates which allows me to teleport around the map. The issue I'm facing right now is that I need way too many hotkeys for these coordinates and I want to be able to toggle them freely.
For context, there are many maps that the game has and I want to save some specific coordinates for each map and be able to teleport to them with hotkeys that set specific values to the addresses. So lets say for Map 1 there are 5 locations I need to visit, so 5 hotkeys. For Map 2 I might need 7 locations, etc.
Ideally what I want to have is a group header like Map 1 and the coordinate addresses as children and when I toggle the header, the hotkeys would also get toggled. That way I could have hotkeys for different maps overlap. I noticed that there are checkboxes next to the hotkeys in UI to disable them, but I don't think there is an option to automatically toggle them with the address activation or with the header.
So next thing I tried is having a lua script as the parent and then changing `hk.HotkeyEnabled` value of the hotkeys in ENABLED and DISABLED blocks. But it seems that the hotkey states get restored after the ENABLED/DISABLED blocks complete (?) so that didn't work.
The only option I can think of right now is to create and destroy the hotkeys programmatically in a lua script, but that sounds like a very last ditch effort since having like 21 hotkeys with specific values to set described in a single script seems very tedious and without the description it would be easy to mix around some values and get lost.
Maybe one other option would be to have a lua script running indefinitely in the background and checking the state of the header and then using `hk.HotkeyEnabled` value for the existing hotkeys and since it would not happen in ENABLED/DISABLED block, maybe it would not get overwritten.
So my question, is there currently a way to automatically disable hotkeys created in UI? If not, maybe you could have some other suggestions for this use case?
Sorry, if I didn't make a lot of sense, just trying to learn 😅
|
|