www.tombraiderforums.com  

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

Closed Thread
 
Thread Tools
Old 20-05-12, 21:33   #1
julien
Historian
 
Join Date: May 2009
Location: Orléans, France
Posts: 437
Default TRNG - Diary + Load + Save in one item

Diary+ Load+ Save in one item.


note: work fine with the savegame panel


First part : An example of Diary
Firstly, add your Diary in your script. For more information about the Diary, see the description in the reference panel of NG Center.

Code:
Equipment= PUZZLE_ITEM1,1
WindowsFont= 1, Arial, WFF_BOLD+WFF_CENTER_ALIGN+WFF_SHADOW, 40, 1, 2 
WindowsFont= 2, Arial, WFF_LEFT_ALIGN, 22, 1, IGNORE 
Diary= 1,PUZZLE_ITEM1,LDF_ZOOM_START+LDF_SOUND_EFFECTS, 1, PL_DOUBLE_PAGE, @pages_1_3.txt,1,2
My Diary is on the slot : PUZZLE_ITEM1


Second Part : Add Load and Save functions
Secondly, you have to change type of flag in the Inventory Memory Zone of your item.

Code:
Parameters= PARAM_BIG_NUMBERS,12292

TriggerGroup=	65,$2000, 51, $12,$2000, 51, $13,$2000, 335, $25,$2000, 338, $9

; Set Trigger Type - FLIPEFFECT 51
; Exporting: TRIGGER(18:0) for FLIPEFFECT(51)
; <#> : Keyboard. Disable <&>keyboard command for (E) time
; <&> :  Save the game (special)
; (E) : Forever (use other action/effect to disable it)
; Values to add in script command: $2000, 51, $12

; Set Trigger Type - FLIPEFFECT 51
; Exporting: TRIGGER(19:0) for FLIPEFFECT(51)
; <#> : Keyboard. Disable <&>keyboard command for (E) time
; <&> :  Load the game (special)
; (E) : Forever (use other action/effect to disable it)
; Values to add in script command: $2000, 51, $13

; Set Trigger Type - FLIPEFFECT 335
; Exporting: TRIGGER(37:0) for FLIPEFFECT(335)
; <#> : Variables. Memory. Set the <&>Inventory item as Selected Inventory Memory
; <&> : PUZZLE_ITEM1 ***
; (E) : 
; Values to add in script command: $2000, 335, $25

; Set Trigger Type - FLIPEFFECT 338
; Exporting: TRIGGER(9:0) for FLIPEFFECT(338)
; <#> : Variables. Memory. Set in <&>Inventory Memory the (E)Big Number value
; <&> : Type Flags. (4 = USE, 32 = EXAMINE, $1000 = LOAD ect) (Short)
; (E) : Value of Parameters=PARAM_BIG_NUMBERS at index= 0
; Values to add in script command: $2000, 338, $9

GlobalTrigger= 23,IGNORE,GT_ALWAYS,-1,-1,65,-1
*** don't forget to change this flipeffect if PUZZLE_ITEM1 isn't your Diary


Why used 12292 in a PARAM_BIG_NUMBER command???

because you want:
Load Game+Save Game+Use (for the diary) functions assigned at your item.
so you have 4096+8192+4 = 12292
12292 is the value to enter in "Type of Flag" of your item.


The values for type of flags in the Inventory Zone Memory are the following:

----
equip= 10
use= 4
separate= 16
examine= 32
shotgun ammo= 64
crowbow ammo= 128
grenade ammo= 256
uzi ammo= 512
pistols ammo= 1024
revolver ammo= 2048
load game= 4096
save game= 8192

----

Since engine doesn't support value greater than 255 in Trigger Type Window, you're obliged to use a PARAM_BIG_NUMBER command

Third part : Restore Quick saving, when you Press F5/F6
Since "Keyboard. Disable <&>keyboard command for (E) time" remove Load and Save, including quick saving, you can restore quick save function with following commands:

Code:
Globaltrigger=	24, -1,GT_KEYBOARD_CODE,63,-1,66,-1
TriggerGroup=	66,$2000, 53, $13[/I]
; Set Trigger Type - FLIPEFFECT 53
; Exporting: TRIGGER(19:0) for FLIPEFFECT(53)
; <#> : Keyboard. Simulate receivement of <&>keyboard comand in (E) way
; <&> : Load the game (special)
; (E) : Single sending
; Values to add in script command: $2000, 53, $13

Globaltrigger=	25, -1,GT_KEYBOARD_CODE,64,-1,67,-1
TriggerGroup=	67,$2000, 53, $12
; Set Trigger Type - FLIPEFFECT 53
; Exporting: TRIGGER(18:0) for FLIPEFFECT(53)
; <#> : Keyboard. Simulate receivement of <&>keyboard comand in (E) way
; <&> : Save the game (special)
; (E) : Single sending
; Values to add in script command: $2000, 53, $12

Last edited by julien; 20-05-12 at 22:10.
julien 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 01:37.


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