![]() |
Configured the key. How is key cancel? - Printable Version +- Gothic Online Forums (https://archive.gothic-online.com) +-- Forum: Scripting (English) (https://archive.gothic-online.com/forum-11.html) +--- Forum: Scripting Help (https://archive.gothic-online.com/forum-12.html) +--- Thread: Configured the key. How is key cancel? (/thread-2717.html) |
Configured the key. How is key cancel? - demor140202 - 24.02.2020 Hi Quarchodron, and other programmers. I know how to configure the keys by clicking on which something will happen. But how do I cancel these settings? How do I make the key stop calling an action? Code: addEventHandler("onKey",function(key) And then return " F7 " to its original form, so that the key does not start freezing. All that happens is that I delete the "onKey" event . And in General, everything stops working (chat, list of players) RE: Configured the key. How is key cancel? - Patrix - 24.02.2020 demor140202 Wrote:I know how to configure the keys by clicking on which something will happen. But how do I cancel these settings? How do I make the key stop calling an action? Hm.. that depends of your "needs". If you only want a F7 key to stop working after pressing it, you can always write something like this: Squirrel Script
In order to re-enable the F7 functionallity, change the content of the "freezeKeyEnabled" variable back to "false". Also, maybe you don't want to "disable" the key, but rather after pressing it second time, call the setFreeze(false). To do that, you can make something like this: Squirrel Script
Also, do note, that you can add more than one function to a specific event using addEventHandler function. RE: Configured the key. How is key cancel? - demor140202 - 25.02.2020 (24.02.2020, 12:50)Patrix Wrote:Thanks, buddy.demor140202 Wrote:I know how to configure the keys by clicking on which something will happen. But how do I cancel these settings? How do I make the key stop calling an action? |