24-11-17, 18:46 | #1 |
Member
Joined: Jun 2010
Posts: 1,503
|
TRNG - Dual Magnums
The goal of this tutorial is to show you how to set up believable dual Magnums in TRNG.
Since we are using the Revolver slot to achieve this, the game will still treat is as one weapon, so Lara will always aim at every enemy with both of her guns, instead of just one, even if the enemy is to the left or right of her. Check out the video if you want to see how it looks in-game: Before we start, go ahead and download the Magnums WAD. First we're gonna set up the Magnums with the CUST_WEAPON and CUST_AMMO commands. Code:
Customize= CUST_WEAPON, SIXSHOOTER_ITEM, IGNORE, IGNORE, 9, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, 1456, IGNORE, IGNORE, 4, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE Customize= CUST_AMMO, SIXSHOOTER_AMMO_ITEM, IGNORE, 4, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE FramesForRecharge determines the fire rate. The Revolver is a bit slower so we made it as fast as the Pistols. I'm not sure what Random and FrameCounter actually do but I set them to the same values as the Pistols. In the CUST_AMMO command we set Damage to 4. The magnums actually only do half that damage but since we technically only have 1 weapon instead of 2, we double the damage. Now we get to the interesting part. We set up the animations but if you check the magnums in-game now, you'll see that she actually only has one of them in her hands. So how do we force her to take the other one out as well? We set up a simple condition. First we copy the currently selected weapon to Global Short Alfa1 and check if it's 2 because that's the Revolver/our Magnums. Code:
; Set Trigger Type - FLIPEFFECT 244 ; Exporting: TRIGGER(1808:0) for FLIPEFFECT(244) {Tomb_NextGeneration} ; <#> : Variables. Memory. Copy to <&>Numeric Variable the (E)Savegame Memory value ; <&> : Global Short Alfa1 ; (E) : Lara. Current Weapon (not necessarly in the hand) (Short) ; Values to add in script command: $2000, 244, $710 ; Set Trigger Type - CONDITION 43 ; Exporting: CONDITION(43:58) for PARAMETER(16) {Tomb_NextGeneration} ; <#> : Global Short Alfa1 ; <&> : Variables. The <#>Numeric Variable is = than (E)Value ; (E) : Value= 2 ; Values to add in script command: $8000, 16, $22B Code:
; Set Trigger Type - CONDITION 85 ; Exporting: CONDITION(85:0) for PARAMETER(6) {Tomb_NextGeneration} ; <#> : LARA_DRAW 6 Ok hols_out ; <&> : Sound. The <#>Sfx Sound effect is playing ; (E) : ; Values to add in script command: $8000, 6, $55 ; Set Trigger Type - FLIPEFFECT 100 ; Exporting: TRIGGER(1549:0) for FLIPEFFECT(100) {Tomb_NextGeneration} ; <#> : Lara. (Mesh) Set single <&>Lara mesh with mesh got from (E)slot ; <&> : Lara Left Hand ; (E) : SLOT 6 SIXSHOOTER_ANIM ; Values to add in script command: $2000, 100, $60D ; Set Trigger Type - CONDITION 85 ; Exporting: CONDITION(85:0) for PARAMETER(7) {Tomb_NextGeneration} ; <#> : LARA_HOLSTER 7 Ok hols_in ; <&> : Sound. The <#>Sfx Sound effect is playing ; (E) : ; Values to add in script command: $8000, 7, $55 ; Set Trigger Type - FLIPEFFECT 100 ; Exporting: TRIGGER(13:0) for FLIPEFFECT(100) {Tomb_NextGeneration} ; <#> : Lara. (Mesh) Set single <&>Lara mesh with mesh got from (E)slot ; <&> : Lara Left Hand ; (E) : SLOT 0 LARA ; Values to add in script command: $2000, 100, $D Code:
GlobalTrigger= 1, IGNORE, GT_CONDITION_GROUP, IGNORE, 1, 2, IGNORE TriggerGroup= 1, $2000, 244, $710, $8000, 16, $22B TriggerGroup= 2, $8000, 6, $55, $2000, 100, $60D, $8000 + TGROUP_ELSE, 7, $55, $2000, 100, $D We set up another GlobalTrigger. This time we check if Lara is currently holding the Magnums. Code:
; Set Trigger Type - CONDITION 35 ; Exporting: CONDITION(35:58) for PARAMETER(2) {Tomb_NextGeneration} ; <#> : Holding_Revolver ; <&> : Lara. (Holds) Lara is holding/driving the <#>item ; (E) : ; Values to add in script command: $8000, 2, $23 Code:
; Set Trigger Type - FLIPEFFECT 244 ; Exporting: TRIGGER(22545:4) for FLIPEFFECT(244) {Tomb_NextGeneration} ; <#> : Variables. Memory. Copy to <&>Numeric Variable the (E)Savegame Memory value ; <&> : Global Short Alfa2 ; (E) : WeaponAnim. Current frame of weapon animation (Short) ; Values to add in script command: $2000, 244, $5811 ; Set Trigger Type - CONDITION 43 ; Exporting: CONDITION(43:4) for PARAMETER(17) {Tomb_NextGeneration} ; <#> : Global Short Alfa2 ; <&> : Variables. The <#>Numeric Variable is = than (E)Value ; (E) : Value= 29 ; Values to add in script command: $8000, 17, $1D2B ; Set Trigger Type - FLIPEFFECT 17 ; Exporting: TRIGGER(0:4) for FLIPEFFECT(17) {Tomb_NextGeneration} ; <#> : OldFlip. Creates left gun constant flare ; <&> : Variables. The <#>Numeric Variable is = than (E)Value ; (E) : ; Values to add in script command: $2000, 17, $0 ; Set Trigger Type - FLIPEFFECT 250 ; Exporting: TRIGGER(319:4) for FLIPEFFECT(250) {Tomb_NextGeneration} ; <#> : Variables. Memory. Subtract to <&>Savegame Memory the (E)Value ; <&> : Inventory. Ammo revolver (Short) ; (E) : Value 1 ; Values to add in script command: $2000, 250, $13F Code:
GlobalTrigger= 2, IGNORE, GT_CONDITION_GROUP, IGNORE, 3, 4, IGNORE TriggerGroup= 3, $8000, 2, $23 TriggerGroup= 4, $2000, 244, $5811, $8000, 17, $1D2B, $2000, 17, $0, $2000, 250, $13F None of Lara's body parts are ever completely still but Lara's hips seem to move the least so I attached the smoke to her hips. Code:
AddEffect= 1, ADD_SMOKE, FADD_CONTINUE_EMIT, 0, -75, -300, 300, IGNORE, IGNORE, IGNORE Code:
; Set Trigger Type - CONDITION 35 ; Exporting: CONDITION(35:0) for PARAMETER(2) {Tomb_NextGeneration} ; <#> : Holding_Revolver ; <&> : Lara. (Holds) Lara is holding/driving the <#>item ; (E) : ; Values to add in script command: $8000, 2, $23 ; Set Trigger Type - CONDITION 85 ; Exporting: CONDITION(85:0) for PARAMETER(121) {Tomb_NextGeneration} ; <#> : DESSERT_EAGLE_FIRE 121 Ok d_eagle ; <&> : Sound. The <#>Sfx Sound effect is playing ; (E) : ; Values to add in script command: $8000, 121, $55 ; Set Trigger Type - ACTION 48 ; Exporting: TRIGGER(304:0) for ACTION(4) {Tomb_NextGeneration} ; <#> : LARA ID 4 in sector (6,12) of Room4 ; <&> : Effect. Add to <#>Enemy the (E)AddEffect from script.txt ; (E) : AddEffect= 1 ; Values to add in script command: $5000, 4, $130 ; Set Trigger Type - ACTION 49 ; Exporting: TRIGGER(305:0) for ACTION(4) {Tomb_NextGeneration} ; <#> : LARA ID 4 in sector (6,12) of Room4 ; <&> : Effect. Remove from <#>Enemy the (E)AddEffect from script.txt ; (E) : AddEffect= 1 ; Values to add in script command: $5000, 4, $131 Code:
AddEffect= 1, ADD_SMOKE, FADD_CONTINUE_EMIT, 0, -75, -300, 300, IGNORE, IGNORE, IGNORE GlobalTrigger= 3, IGNORE, GT_CONDITION_GROUP, IGNORE, 5, 6, 7 TriggerGroup= 5, $8000, 2, $23, $8000, 121, $55 TriggerGroup= 6, $5000, 4, $130 TriggerGroup= 7, $5000, 4, $131 |
Thread Tools | |
|
|