Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Next Generation Level Editor

Thread Tools
Old 18-02-19, 17:39   #13231
TheLostSecret's Avatar
Join Date: Mar 2018
Location: Tehran, Iran
Posts: 504
Arrow A solution for your problem...

Originally Posted by A_De View Post
Does anybody know how to disable keyboard keys during flyby or Inventory/Pause menu?
For some reasons there are only controls disabled, but not other keys. I added the hotkey for diary and it can be switched on always, no matter if the controls are off. The same is about using PLS with globaltrigger with GT_GAME_KEY2_COMMAND and KEY2_USE_FLARE. It completely ignores any status of controls, and there even does not matter if Lara is alive or not.
Hello A_De!

There is one solution for you which I suppose it can help you with your issue.

This is how the algorithm works:

We need to allocate a variable to check for us whether a flyby camera is active or we are in our Inventory/Pause Menu. Whenever the variable is set to 1, it means that the game is busy doing some operations hence our other TriggerGroups in action must be suspended. After the operation is complete ( I mean when the player has exited Inventory/Pause Screen and/or the flyby scene has been broken/ended ), we will set the value to 0, which means there are no more operations to wait for.

Here, I have used Local Byte Delta4 variable, but if you have already occupied this variable, you can change the code the way you want!

GlobalTrigger=  1 , IGNORE , GT_GAME_KEY2_COMMAND , 65536 , IGNORE , 1 , 2
GlobalTrigger=  2 , IGNORE , GT_GAME_KEY2_COMMAND , 8192 , IGNORE  , 1 , 2
GlobalTrigger=  3 , IGNORE , GT_CONDITION_GROUP , IGNORE , 3 , 1 , 2

TriggerGroup=  1 , $2000, 232, $14B
TriggerGroup=  2 , $2000, 232, $4B
TriggerGroup=  3 , $8000+TGROUP_AND, 13, $34 , $8000+TGROUP_AND, 10, $5
Now, a very strange thing you might realize is that we have used GT_GAME_KEY2_COMMAND, but what does 65536 mean? This is something I have discovered recently. According to Microsoft DirectX DirectInput Knowledge Base, each key code is assigned with a value of power 2. 65536 equals 2 ^ 16, which means 16 is the control ID handle for "Pause" command and a power of two is the code received by game from our controller device.

Maybe this question might pop up in your mind that why do I have to use a GT_GAME_KEYX_COMMAND? Why can't I use other condition triggers to check for input? The answer is that when the inventory/pause menu is prompted, the game's background operations such as rendering the scene, getting other inputs, etc. will be disabled 1 frame before the inventory/pause menu is shown, but here we need a command that has A VERY HIGH PRIORITY which even works in the suspension frame, and as a result, GT_GAME_KEYX_COMMAND is the best choice.

So, the code works like this:

GlobalTrigger with ID 1 waits for "Pause" key input from the player. As soon as the mapped button is received from our controller device, it will set the Local Byte Alfa4 value to 1. If not TRUE, it will revert it back to 0.
GlobalTrigger with ID 2 waits for "Inventory" key input from the player. As soon as the mapped button is received from our controller device, it will set the Local Byte Alfa4 value to 1. If not TRUE, it will revert it back to 0.
GlobalTrigger with ID 3 checks for miscellaneous conditions, such as if there is a flyby sequence in progress or if Lara is dying.

TriggerGroup with ID 1 sets the variable's value to 1.
TriggerGroup with ID 2 sets the variable's value to 0.
TriggerGroup with ID 3 is our condition group.



Just add this condition trigger to the beginning of each TriggerGroup you want to control its suspension while the game is busy doing some operations ( such as player is in pause menu/inventory and other conditions you would like to be there! ):

$8000+TGROUP_AND, 75, $2B , ;OTHER COMMANDS...
; Set Trigger Type - CONDITION 43
; Exporting: CONDITION(43:62) for PARAMETER(75) {Tomb_NextGeneration}
; <#> : Local Byte Delta4
; <&> : Variables. The <#>Numeric Variable is = than (E)Value
; (E) : Value= 0
; Values to add in script command: $8000, 75, $2B

If you had any problems, let me know and I would be grateful to help you!
Egypt has many secrets and mysteries yet to be discovered ...

Last edited by TheLostSecret; 18-02-19 at 18:51. Reason: Updating Code
TheLostSecret is online now   Reply With Quote
Old 19-02-19, 10:11   #13232
Dino14's Avatar
Join Date: Apr 2010
Posts: 788

Is it possible to make enemy not turn towards Lara? I had to put monkey in small_scorpion slot because baboon slot causes savegame crashes. It performs only idle animation so it stays on spot. Only problem is that it turns towards Lara and it looks a bit silly.
"Spider-Pig, Spider-Pig, Does whatever a Spider-Pig does."
Dino14 is online now   Reply With Quote
Old Today, 09:41   #13233
Boobandie's Avatar
Join Date: Jul 2012
Location: New Zealand
Posts: 3,537

How would one go about setting up non-pickup multi-use save crystals like in Tomb Raider Anniversary Retold?

Run up to animating object -> face object -> press action -> Lara animation plays -> save window pops up -> either use or close -> second Lara animation plays to return to normal state.

Last edited by Boobandie; Today at 11:25.
Boobandie is offline   Reply With Quote
Old Today, 10:41   #13234
Join Date: Jul 2010
Location: Italy
Posts: 609

Id I remember correctly, Ahmet and Mutant donít do this 😊
I hope in some good news about TRNG!
LGG_PRODUCTION is offline   Reply With Quote
Old Today, 14:58   #13235
Relic Hunter
dcw123's Avatar
Join Date: Nov 2007
Location: England, UK Gender:Male
Posts: 6,478

Having a REALLY annoying issue with it stopping me from TRLE'ing at all.

So I am using NGLE and made a room - textured and places a light bulb - all fine.
However, when I move the camera using the mouse (to do something like place an object or whatever) the editor crashes..
and it doesn't make a backup save.. so I lost the work

Could have sworn I set the resolution and stuff to prevent this crash on modern systems, but it seems to be doing it anyway.
Disabled and enabled CRS - nothing changes
Zero Fox Given
dcw123 is offline   Reply With Quote


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 21:08.

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