Page 1 of 1
May I ask how to prevent players from modifying shortcut keys?
Posted: Mon Nov 04, 2024 12:27 pm
by sdgmlj
I added a 'custom input' and I don't want players to modify it. How can I set it up? Or hide it?
Code: Select all
{
type = "custom-input",
name = "fast-transmission",
hidden = true, --invalid??????
key_sequence = "CONTROL + mouse-button-1",
}
Re: May I ask how to prevent players from modifying shortcut keys?
Posted: Mon Nov 04, 2024 1:50 pm
by Pi-C
sdgmlj wrote: Mon Nov 04, 2024 12:27 pm
I added a 'custom input' and I don't want players to modify it.
Why would you want that?
How can I set it up? Or hide it?
If you hide it (I presume from Main menu --> Controls), how would the players know that your custom input exists, and what key sequence will trigger it?
Personally, I use the opposite approach: I don't want to think what key sequence I should assign to a shortcut, so I set 'key_sequence' to an empty string and don't set 'alternative_key_sequence', ' controller_key_sequence', and 'controller_alternative_key_sequence' at all. Players know best what key_sequences are most convenient to use given their mods, keyboard layout, whether they are left-handed or right-handed …
Re: May I ask how to prevent players from modifying shortcut keys?
Posted: Mon Nov 04, 2024 1:55 pm
by sdgmlj
Pi-C wrote: Mon Nov 04, 2024 1:50 pm
sdgmlj wrote: Mon Nov 04, 2024 12:27 pm
I added a 'custom input' and I don't want players to modify it.
Why would you want that?
How can I set it up? Or hide it?
If you hide it (I presume from Main menu --> Controls), how would the players know that your custom input exists, and what key sequence will trigger it?
Personally, I use the opposite approach: I don't want to think what key sequence I should assign to a shortcut, so I set 'key_sequence' to an empty string and don't set 'alternative_key_sequence', ' controller_key_sequence', and 'controller_alternative_key_sequence' at all. Players know best what key_sequences are most convenient to use given their mods, keyboard layout, whether they are left-handed or right-handed …
First of all, thank you for answering my question. I will explain to the player what the shortcut key is and its purpose, but I don't want the player to modify it casually. Is it impossible to achieve this?