Join Date: Dec 2011
TRNG – Disable keys, except in menus
Made using TRNG 184.108.40.206.+
A frequent problem of TRNG that you want to disable arrows and CTRL with F51 trigger, so Lara can’t move or shoot or else, but it will also disable the keys in menus, so you can’t scroll etc. menus.
To fix it, type this setup in your script, instead of using F51 in other ways:
GlobalTrigger=1 , FGT_DISABLED, GT_ALWAYS, IGNORE, IGNORE, 1, IGNORE
TriggerGroup= 1, $2000, 51, $3, >; F51: disable left
$2000, 51, $4, > ; F51: disable right
$2000, 51, $1, > ; F51: disable up
$2000, 51, $2, > ; F51: disable down
$2000, 51, $9 ; F51: disable Key Action
GlobalTrigger= 2, IGNORE, GT_KEYBOARD_CODE, 1, IGNORE, 2, IGNORE ; ESC for Inventory
GlobalTrigger= 3, IGNORE, GT_KEYBOARD_CODE, 25, IGNORE, 2, IGNORE ; P for Pause menu
GlobalTrigger= 4, IGNORE, GT_KEYBOARD_CODE, 63, IGNORE, 2, IGNORE ; F5 for Save Game menu
GlobalTrigger= 5, IGNORE, GT_KEYBOARD_CODE, 64, IGNORE, 2, IGNORE ; F6 for Load Game menu
TriggerGroup= 2, $2000, 52, $3, >; F52: enable left
$2000, 52, $4, > ; F52: enable right
$2000, 52, $1, > ; F52: enable up
$2000, 52, $2, > ; F52: enable down
$2000, 52, $9 ; F52: enable Key Action
Naturally you should enable GT#1 when you want to disable Lara’s moves, and disable it again if you want to enable them again.
Anyway, it is a very strange setup. I mean, GT_ALWAYS should perform its effect even if the menu is open, so even AFTER I have opened it with Key ESC, P, F5, F6. However, I can use those keys if the menus are open.
And it seems it doesn’t work for the similar C12 or C13 condition triggers, only if I control the keys with GT_KEYBOARD_CODE!
So I suppose this is the rule:
If I open the menus with the key referred in GT_KEYBOARD_CODE, then it will overwrite the effect of any other (so not only GT_ALWAYS!) GlobalTrigger, until closing that menu.
Last edited by AkyV; 20-06-16 at 13:37.