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

Closed Thread
Thread Tools
Old 28-10-17, 14:26   #1
Titak's Avatar
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,141
Default TRNG - Re-enable & Disable Pickups

Tutorial made by matrix54

Native to the TRLE is the ability to pickup ammunition after Lara has used all of a particular type up, with the exception of uzi ammo. For years, players have wanted this very ability for all pickups and it's finally arrived! It even works on Uzi ammo!

It's also super simple, red being the the item index you wish to change (which can be grabbed by clicking on the objects in the TRLE). This object will require the OCB code of 128 for this to work in addition to any OCBs for picking it up from a pedestal, a higher pedestal, or activating a trigger.

; Set Trigger Type - ACTION 54
; Exporting: TRIGGER(54:0) for ACTION(85) {Tomb_NextGeneration}
; <#> : UZI_AMMO_ITEM              ID 85     in sector (9,9) of Room0
; <&> : Variables. Set the index of <#>moveable as Selected Item
; (E) : 
; Values to add in script command: $5000, 85, $36
; Set Trigger Type - FLIPEFFECT 255
; Exporting: TRIGGER(8231:0) for FLIPEFFECT(255) {Tomb_NextGeneration}
; <#> : Variables. Memory. Set in <&>Selected Item memory the (E)Value
; <&> : Flags of Item (Long)
; (E) : Value     32
; Values to add in script command: $2000, 255, $2027
When put into a trigger group together when scripting:

TriggerGroup= 1, $5000, 85, $36, $2000, 255, $2027
That's all there is to it! You can trigger the trigger group within the level, or assign it to a global trigger. Since the example uses uzi ammo, you can run a global trigger that checks if Lara is out of uzi ammo, and the game will restore it no problem. Alternatively, you can create some interesting puzzles which requires Lara to use and reacquire spent items.

What value is being changed exactly? These are a selected itemsís object flags. Though it is recommended that you donít experiment with them (since the game will easily crash if you used the wrong values), the codes provided in this tutorial do no harm. I also suggest calculating and assigning prior to using flags to avoid crashes.

Here are the flags:
1 - NONE // Used to clear flags
2 - ACTIVE // Item is active
4 - CREATURE // Creatures are Invisible until triggers
8 - NOT_VISIBLE // Item was not visible before being active
16 - GRAVITY_AFFECTED // Item is falling or jumping and is subject to the gravity simulation
32 - NOT_YET_ENABLED // Object hasnít been enabled
64 - KILLED_WITH_EXPLOSION // Added to remember that the enemy was killed with an explosion
128 - POISONED // This object has been poisoned
256 - AI_GUARD // This enemy was over AI_GUARD
512 - AI_AMBUSH // This enemy was over...
1024 - AI_PATROL1 // ...
2048 - AI_MODIFY // ...
4096 - AI_FOLLOW // ...
8192 - THROWN_AMMO // Unsure if used for visible ammo like grenades or arrows
If by chance you wish to disable the objects, here's the alternative to the original input. Just remember to change the item index (again, in red):

; Set Trigger Type - FLIPEFFECT 255
; Exporting: TRIGGER(9767:0) for FLIPEFFECT(255) {Tomb_NextGeneration}
; <#> : Variables. Memory. Set in <&>Selected Item memory the (E)Value
; <&> : Flags of Item (Long)
; (E) : Value     38
; Values to add in script command: $2000, 255, $2627
TriggerGroup= 2, $5000, 85, $36, $2000, 255, $2627
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak 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 05:58.

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