Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tutorials and Resources

Closed Thread
Thread Tools
Old 04-03-16, 13:31   #1
Join Date: Dec 2011
Location: Hungary
Posts: 3,528
Default TRNG Disable keys, except in menus

Made using TRNG

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:

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 12:37.
AkyV is offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 19:09.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.