Binding keymap to another keymap

Ask questions, discuss ideas, get answers

Binding keymap to another keymap

Postby metan » Sun Oct 28, 2018 9:59 pm

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
User avatar
metan
 
Posts: 2
Joined: Sun Oct 28, 2018 7:53 pm

Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Google [Bot] and 30 guests

cron