Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tomb Raider Next Generation

Reply
 
Thread Tools
Old 18-02-19, 17:39   #13231
TheLostSecret
Member
 
Joined: Mar 2018
Posts: 632
Arrow A solution for your problem...

Quote:
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!

Code:
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.

HOW TO MAKE OUR CODE WORK?

Simple!

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! ):

Code:
$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!

Last edited by TheLostSecret; 18-02-19 at 18:51. Reason: Updating Code
TheLostSecret is offline   Reply With Quote
Old 19-02-19, 10:11   #13232
Dino14
Member
 
Dino14's Avatar
 
Joined: Apr 2010
Posts: 806
Default

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.
Dino14 is offline   Reply With Quote
Old 21-02-19, 09:41   #13233
Boobandie
Member
 
Joined: Jul 2012
Posts: 4,286
Default

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; 21-02-19 at 11:25.
Boobandie is offline   Reply With Quote
Old 21-02-19, 10:41   #13234
LGG_PRODUCTION
Member
 
LGG_PRODUCTION's Avatar
 
Joined: Jul 2010
Posts: 858
Default

Id I remember correctly, Ahmet and Mutant don’t do this 😊
LGG_PRODUCTION is offline   Reply With Quote
Old 21-02-19, 14:58   #13235
dcw123
Member
 
dcw123's Avatar
 
Joined: Nov 2007
Posts: 7,582
Default

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
dcw123 is offline   Reply With Quote
Old 28-02-19, 10:02   #13236
Mulf
Member
 
Mulf's Avatar
 
Joined: May 2001
Posts: 1,275
Default

I’m using the electric cables from TR5 Submarine again and was sure that this time I could add electric sparks to their meshes, such as they had in the original level. However, it turns out that ADD_EFFECT does not offer this particular option. Is there another way of adding electric sparks to a mesh?
Mulf is offline   Reply With Quote
Old 28-02-19, 15:30   #13237
SrDanielPonces
Member
 
SrDanielPonces's Avatar
 
Joined: Apr 2012
Posts: 10,346
Default

Quote:
Originally Posted by Boobandie View Post
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.
Aodfan's TR1 reimagined has this saving system, except it has no animation being peformed. Afaik he released his project's files, so you should check that out.
SrDanielPonces is offline   Reply With Quote
Old 28-02-19, 19:42   #13238
A_De
Member
 
A_De's Avatar
 
Joined: Jan 2012
Posts: 1,320
Default

Quote:
Originally Posted by Mulf View Post
I’m using the electric cables from TR5 Submarine again and was sure that this time I could add electric sparks to their meshes, such as they had in the original level. However, it turns out that ADD_EFFECT does not offer this particular option. Is there another way of adding electric sparks to a mesh?
Meshswap + continuous organizer perhaps?
Be careful with that though, because if there is already swapped meshes you can encounter problems with corrupted saves.

Edit:
Can anybody help with condition where the game must check if there is some static nearby, with collision, but Lara does not touch it at the moment? Is this condition possible at all either with plugins or without them?

Last edited by A_De; 01-03-19 at 08:21. Reason: A question appeared
A_De is offline   Reply With Quote
Old 01-03-19, 12:46   #13239
SrDanielPonces
Member
 
SrDanielPonces's Avatar
 
Joined: Apr 2012
Posts: 10,346
Default

Why can't I find a flipeffect to set lara on flames?
SrDanielPonces is offline   Reply With Quote
Old 01-03-19, 13:08   #13240
Tombraider95
Member
 
Tombraider95's Avatar
 
Joined: Dec 2008
Posts: 13,126
Default

Quote:
Originally Posted by SrDanielPonces View Post
Why can't I find a flipeffect to set lara on flames?
Should be under the kill Lara flipeffect?
Tombraider95 is offline   Reply With Quote
Reply

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 22:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.