[TC] Gaming Forums
Conditional Hotkeys? - Printable Version

+- [TC] Gaming Forums (https://forum.city-driving.co.uk)
+-- Forum: General Information (/forumdisplay.php?fid=1)
+--- Forum: General Discussions (/forumdisplay.php?fid=4)
+--- Thread: Conditional Hotkeys? (/showthread.php?tid=34152)



Conditional Hotkeys? - Tommer - 2021-12-03 22:55

I have been playing as a [COP] with a PS4 controller.

There is a limited number of buttons and ideally I want to avoid having to use keyboard so I can keep driving.

I wondered if anyone has a solution to conditionally change what a button mapping does,

For example if my siren is on, I might like my arrows to change from indicators to typing suspect turning left/right in the chat etc.

Such a thing exists? If not, how to go about making it?


RE: Conditional Hotkeys? - Adrian - 2021-12-04 16:00

It can be achieved using just LFS scripts. There are LFS commands, like "crtlf" or "altf", that allow you to dynamically change binds assigned to those shortcuts. So you can just create two scripts, one of them you will execute when you start a chase and another one - when you end the chase.

Script Guide: https://en.lfsmanual.net/wiki/Script_Guide


RE: Conditional Hotkeys? - AnansiMaxine - 2021-12-06 08:09

me that is used to use the numpad for cop binds already:
(:


RE: Conditional Hotkeys? - Dino - 2021-12-07 07:56

Yes, I also drive with gamepad and got the issue of too few binds so I got a script that changes binds depending on roles (cop, civilian, tow)

For example a certain button while copping is
!move
can be something else in the other roles

(LeL LeL LeL Biggrin Biggrin Biggrin HhHhHHHhH bind is mandatory in all roles)

[Image: image.png]


RE: Conditional Hotkeys? - Tommer - 2021-12-07 17:45

Thanks for the input, I ended up writing my own insim program to do this, it polls the public server status to find out if I'm in chase once in a few seconds and changes what the keys do as a result, with special logic for indicator toggles and a few other bits.

It's entirely programmed to my needs but maybe one day I'll make something customizable to share