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 12-01-20, 04:39   #14081
maati139
Member
 
maati139's Avatar
 
Joined: Jan 2012
Posts: 533
Default

Hi! Quick question, is there (on 1.2.2.7+) an option to detect which currently ammo type (1,2,3) Lara is shooting? I mean the exact moment of shot.
maati139 is offline   Reply With Quote
Old 12-01-20, 11:12   #14082
LoreRaider
Member
 
LoreRaider's Avatar
 
Joined: Jul 2016
Posts: 1,900
Default

Not sure about that, neither in TRNG 1.3, maybe you can look at "variables." flipeffect triggers?

Last edited by LoreRaider; 12-01-20 at 11:14.
LoreRaider is offline   Reply With Quote
Old 12-01-20, 11:28   #14083
TokyoSU
Member
 
TokyoSU's Avatar
 
Joined: Mar 2019
Posts: 687
Default

Quote:
Originally Posted by maati139 View Post
Hi! Quick question, is there (on 1.2.2.7+) an option to detect which currently ammo type (1,2,3) Lara is shooting? I mean the exact moment of shot.
you can check what lara weapon is equiped, and then check what ammo type instead of wanting to check the one at the moment of shooting. but i dont know how to do it, just a different idea.
TokyoSU is offline   Reply With Quote
Old 12-01-20, 11:54   #14084
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,872
Default

Quote:
Originally Posted by maati139 View Post
Hi! Quick question, is there (on 1.2.2.7+) an option to detect which currently ammo type (1,2,3) Lara is shooting? I mean the exact moment of shot.
It only checks the ammo, you also need to add "if lara is shooting" condition if you don't want to check it for idle weapons:

- GlobalTrigger
- Triggers exported into the condition of the GlobalTrigger:
Trigger1. An F244 to put the value of the chosen memory zone field into the chosen variable.
Trigger2. A C43 trigger to study the chosen variable value if that is equal with a chosen number (between 0 and 31).

Shotgun:
Choose: "Inventory. Shotgun (Byte)" field.
Values to check: 9 (normal), 17 (wideshot).

Grenade gun:
Choose "Inventory. Greanade-Gun (Byte)" field
Values to check: 9 (normal), 17 (super), 33 (flash)

Crossbow:
Choose "Inventory. CrowBow (Byte)" field
Values to check: 9 (normal, not combined), 13 (normal, combined), 17 (poisoned, not combined), 21 (poisoned, combined), 33 (explosive, not combined), 37 (explosive, combined)

If you don't want to check the combined status of the lasersight, then the formula changes a bit - for example, for normal arrows:

Trigger1. An F244 to put the value of the chosen memory zone field into the chosen variable.
Trigger2. A C43 trigger to study the chosen variable value if that is equal with 9.
Trigger3. A C43 trigger (with TGROUP_OR flag) to study the chosen variable value if that is equal with 13.

EDIT:
For numbers above 31, you can solve it eg. using big numbers, i.e. C40 instead of C43.

Last edited by AkyV; 12-01-20 at 12:05.
AkyV is offline   Reply With Quote
Old 12-01-20, 14:19   #14085
maati139
Member
 
maati139's Avatar
 
Joined: Jan 2012
Posts: 533
Default

Thanks a lot all! Special thanks to AkyV! It works!

I didn't realize that weapons work in that way, so I thought that trigger below will only check if the gun is in inventory or not.

; <#> : Variables. Memory. Copy to <&>Numeric Variable the (E)Savegame Memory value
; <&> : Current Value
; (E) : Inventory. Greanade-Gun (Byte)


Is there any other documentation? I didn't found it in NG Center.
maati139 is offline   Reply With Quote
Old 12-01-20, 15:48   #14086
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,872
Default

Paolone's website has a downloadable tutorial project for variables.

Ps. Be careful with the variables you choose. The tutorial tells about it.
AkyV is offline   Reply With Quote
Old 12-01-20, 17:15   #14087
maati139
Member
 
maati139's Avatar
 
Joined: Jan 2012
Posts: 533
Default

Thanks I will look on it.

I suppose you mean that current value is a variable which many other function can read and write.
I've wrote in script additional condiditions and GT is only activated when Lara is shooting with specific weapon and ammo. So its a specific, short moment.

Last edited by maati139; 12-01-20 at 17:17.
maati139 is offline   Reply With Quote
Old 14-01-20, 10:31   #14088
dcw123
Member
 
dcw123's Avatar
 
Joined: Nov 2007
Posts: 7,581
Default

Sorry to being this up again, but its really bothering me.
I really don't want to have to re-install everything again...

For some reason ALL my levels crash when entering the Statistics screen in the Pause Menu in-game. It crashes to my desktop completely closing TRLE.
According to the crash report its something to do with the Title script.. but mine appears to be fine - I haven't touched it..

;--------------------------------------
; Title
;--------------------------------------

[Title]
LoadCamera= 0,0,0,0,0,0,255
LoadCamera= 84246,-533,78233,81622,-1514,78208,40
Level= DATA\TITLE,104


Log file:

6922: CreateSample 120 of 121
6968: CreateD3DLights
7031: MEDIA azzerata
7047: GlobalData -> VariableData
7062: FileClose
7062: cbInitLevel() with Save/load mode=0
10125: FreeImage(): image0.bmp
10125: Set in ImageMonoScreen image from TempImage
10828: Crash at 0x914000 Reason: EXCEPTION_ACCESS_VIOLATION
10843: Mostra Task Bar

Not exactly game breaking but still - any idea what the cause is?

Recorded a small video to show it in action...
https://streamable.com/jj3xw

Last edited by dcw123; 14-01-20 at 10:40.
dcw123 is offline   Reply With Quote
Old 14-01-20, 10:42   #14089
TokyoSU
Member
 
TokyoSU's Avatar
 
Joined: Mar 2019
Posts: 687
Default

Quote:
Originally Posted by dcw123 View Post
Sorry to being this up again, but its really bothering me.
I really don't want to have to re-install everything again...

For some reason ALL my levels crash when entering the Statistics screen in the Pause Menu in-game. It crashes to my desktop completely closing TRLE.
According to the crash report its something to do with the Title script.. but mine appears to be fine - I haven't touched it..

;--------------------------------------
; Title
;--------------------------------------

[Title]
LoadCamera= 0,0,0,0,0,0,255
LoadCamera= 84246,-533,78233,81622,-1514,78208,40
Level= DATA\TITLE,104


Log file:

6922: CreateSample 120 of 121
6968: CreateD3DLights
7031: MEDIA azzerata
7047: GlobalData -> VariableData
7062: FileClose
7062: cbInitLevel() with Save/load mode=0
10125: FreeImage(): image0.bmp
10125: Set in ImageMonoScreen image from TempImage
10828: Crash at 0x914000 Reason: EXCEPTION_ACCESS_VIOLATION
10843: Mostra Task Bar

Not exactly game breaking but still - any idea what the cause is?

Recorded a small video to show it in action...
https://streamable.com/jj3xw
Have you set a image for the statistics (it use inventory) ?
and you have 2 loadcamera instead of one.
TokyoSU is offline   Reply With Quote
Old 14-01-20, 10:46   #14090
dcw123
Member
 
dcw123's Avatar
 
Joined: Nov 2007
Posts: 7,581
Default

Ahh yes that all works just fine.
And I edited the LoadCamera to just one - still crashes.
Only thing I can think of is that my TRLE root folder is a bit of a mess (mainly just plugin folders and their dll's etc)
It was the only way I could get plugins and the install to work
(I installed TRLE and TRNG into the same folder)

Oddly enough, this wasn't an issue when building my C.A.C level, so why would it cause an issue now.. hmmmm very odd indeed

Last edited by dcw123; 14-01-20 at 10:56.
dcw123 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 04:10.


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.