Binding keymap to another keymap

Ask questions, discuss ideas, get answers
Post Reply
User avatar
metan
Posts: 2
Joined: Sun Oct 28, 2018 7:53 pm

Binding keymap to another keymap

Post by metan »

I don't know how to name this topic properly so I'll just try to explain the problem :roll:
As you know, the line

Code: Select all

console.bindKeyToConsoleScript 1 myscript
executes myscript.con by pressing key which was assigned to c_GIScript1. Line

Code: Select all

ControlMap.addKeyToTriggerMapping c_GIScript1 IDFKeyboard IDKey_B c_CMNonRepetive
assigns c_GIScript1 to key B. That means that the script will be executed by pressing only precoded button (in this case - it would be B).
Is there any way to bind c_GIScript to "TriggerMapping" so that the script will be executed by pressing let's say c_PICrouch key (which can be set in-game with controls settings)?
I found that 1st arguments for both ControlMap.addKeyToTriggerMapping and console.bindKeyToConsoleScript commands are both integer types and tried to bypass controlmap command like this:

Code: Select all

console.bindKeyToConsoleScript c_PICrouch myscript
but as I expected, it didn't work. The line

Code: Select all

ControlMap.addKeyToTriggerMapping c_GIScript1 c_PICrouch c_CMNonRepetive
obviously didn't work too since it uses wrong number and type of arguments
Post Reply