21-09-15, 07:58 | #1 |
Moderator
Joined: Dec 2011
Posts: 4,881
|
TRNG Adjust an upper limit for ammo/medipack/flare
Possibly you dont want the player to stockpile too much amount of an ammo/medipack/flare item.
It is possible even with TRLE, using OCB128: http://www.tombraiderforums.com/show...light=gameplay But this little tutorial shows you how you can adjust a particular upper limit with TRNG: If the player picks up an item, so that the inventory will have too much amount of that item, then the game will modify the amount to the upper limit. For example, you dont want the player to have more than 500 Uzi bullets, so you adjust that limit. Lara has 480 Uzi bullets when she picks up an Uzi clip pair with 30 bullets. The result would be 510 bullets. But, thanks to the limit, it will be modified back to 500 bullets. If Lara picks up another clip pair now, then nothing will happen, because she has exactly 500 bullets. GlobalTrigger= 1, IGNORE, GT_CONDITION_GROUP, IGNORE, 1, 2, IGNORE TriggerGroup= 1, $2000, 244, $X10, > ;copy the actual amount of X inventory item into Global Short Alfa1 (GSA1) variable $8000, 16, $26 ; if GSA1>= value (Y) at PARAM_BIG_NUMBERS index#0 TriggerGroup= 2, $2000, 263, $110, > ; adjust value (Z) at PARAM_BIG_NUMBERS index#1 in GSA1 $2000, 245, $X10 ; force GSA1 value into the actual amount of X inventory item Parameters= PARAM_BIG_NUMBERS, Y, Z X values are: 3A small medipack 3B big medipack 3C - flare 3D pistol ammo 3E Uzi ammo 3F revolver ammo 40 normal shotgun ammo 41 wideshot shotgun ammo 42 normal grenade 43 super grenade 44 flash grenade 45 normal arrow 46 poisoned arrow 47 explosive arrow Y value is the required limit, plus one. (So, for example, if the limit is 500 bullets, as I said above, then type 501 here.) Z= Y minus 1. (I.e. exactly the required limit.) Note: With shotgun ammo, the ammo limit must be divided per six. So eg. type 180 if you want 30 shotgun ammo. Made using TRNG 1.2.2.7+ |
Thread Tools | |
|
|