Animation= 474,KEY1_ACTION,IGNORE,IGNORE,ENV_MULT_CONDITION,1,IGNORE,1
MultEnvCondition= 1,ENV_NO_BLOCK_IN_FRONT,512,IGNORE,ENV_FREE_HANDS,512,IGNORE
这段代码(一个动作)在NG_Center中添加到自己关卡的那里啊????请详细说明一下!谢谢!
直接在对应关卡的[level]里面就可以了
Syntax: Animation=AnimIndex, KEY1_ , KEY2_ , FAN_ flags, ENV_ Environment, Distance for Env, Extra, StateId (STATE_...) or (-)AnimationIndex array (...)
Scope: to use in [Level] section
With Animation command you can perform new animation for lara when player hit some key.
(This command is suggested only for advanced level builders to add new moves for Lara)
Other to set the number of animation and hot key used to engage in game the animation, you should set also some condition about when this new lara command will be permitted, because perform an animation, for example a kick, while lara is underwater or hanged to rope it should be weird.
Arguments:
AnimIndex field
Here you type the number you see in Animation Editor of Wad Merger program.
Key1 and Key2 fields.
In these fields you can set a code (or two) to identify the activation key of your new animation.
Remark: the special value KEY1_RELEASED may be added to Key1 field to invert condition about keys. When KEY1_RELEASED is present the condition is true only when the specified keys are NOT down.
You can set two kinds of value in Key fields.
Keyboard scancodes or Keyboard game commands.
Both types identify a key of keyboard but there are some differences:
- ScanCodes permit to choose any key (or almost) of keyboard, while Game commands are only the prefixed keys you see in Option screen tomb raider game.
- By other hand, the Game commands have the advantage to be activated also by joystick and if player changes the setting in Option screen of tomb4, your command will continue to work.
Another difference is the way to type the valeus in Key1 and Key2 fields.
If you use Scancodes you should copy the value from Keyboard Scancode list of Reference panel of NG Center program.
While if you want to use preformatted game commands, you can use the constant KEY1_... and KEY2_ ... you find in MNEMONIC CONSTANTS of Reference panel.
When you use game commands remember you have to place the value in Key1 field or in Key2 field in according with prefix KEY1_ and KEY2_.
Differently if you use scancodes you can assign a new key, usually non used by tomb4, for example the scancode for F8 key, or for "Q" literal.
You can also set two different scancodes, writting the first in Key1 and second in Key2. In this case the animation will be performed only when both key are hit in some moment.
For example.
Animation=500, 42, 11, ...
Since 42 = (Shift left) and 11= (Number 0), the animation will be started when player hit in same moment SHIFT + 0 (zero)
Remark: if you want to use scan codes you have to add the flag FAN_KEYS_AS_SCANCODE in FAN_ field.
Note that it's a bit different when you use KeyBoard Game Commands.
With KeyBoard Game command you can insert two or more code in same Key field, just type the sum of these valuese.
For example:
You can require two or more game command in same moment, adding the constant value KEY1_ with other KEY1_.. and KEY2 with other KEY2.
For example to have the combination of game commands Action Jump and Dash, you'll have to insert in key1 field "KEY1_JUMP+KEY1_ACTION" while in Key field the valye "KEY2_DASH".
Remark: If you don't use some of Key1/2 field you should type IGNORE to signal that it is not used.
FAN_ Flags field.
-----------------
You can set one or more flags FAN_ to to set the behavior of animation command.
Read the FAN_ constant values in section _MNEMONIC CONSTANTS of Reference Panel of NG_Center to get info about FAN_ values.
ENV_ Environment field
------------------------
In Environment field you can set a single very spefic condition about the environment around to Lara.
You should use this field only when your animation requires a correct environment around lara like: climbable walls, holes, walls ect.
Remarks:
* Differently by FAN_ flags you can not type the sum of any ENV_ values, you can choose only a single ENV_ condition and you can add to it only ENV_POS_.. flags or ENV_NON_TRUE flag to inverse the mean of condition.
* If you don't want set any Environment you can type IGNORE in this field.
See description of ENV_ constants in MNEMONIC CONSTANTS sectio of Reference panel for usage of ENV_ values.
Distance for Env field
----------------------
If you set a value different by IGNORE in above field named Environment, you can set in this Distance field a number to specify some size or height or range about specific ENV_ condition you set in Environment field.
The common situation is Distance hosts the height/depth of wall/hole.
The units to use are 1024 for 1 sector, so 1 click = 256 and half sector is 512.
It's different the units when Distance field hosts a range, like for Environment named ENV_MONKEY_CEILING. See description of ENV_MONKEY_CEILING value about how set the Distance field in that case.
Remark: you can always type in this field IGNORE and trng engine will use a default value ideal for current ENV_ condition you chose.
Extra field
This field may host different values in according with FAN flags.
Currently it accepts only slot numbers.
If you set flag FAN_WHEN_ON_VEHICLE in Extra field you should type the slot number of vehicle (really the slot on animations for that vehicle)
If you set flag FAN_USE_EXTRA_SLOT in Extra field you type the number of animation slot where find the AnimIndex you set.
StateId or AnimationId array fields
-----------------------------------
After Extra field you can type one or more values to set State-ids or Animation indices to use as condition to start your special animation.
The special animation will be performed only if at least one of given state ids, and one of animation indices, is currently active for Lara in game in the moment that player hit the correct keystroke.
Remark: to recognize State id from Animation indices, you have to use positive values for State-IDs, while negative values for Animation Indices.
For example: the list: "96, 112, -28, -42"
It will be read as: "Perform my animation only if state id of lara is currently = 96 or 112, and, in same moment, the current animation of Lara is 28 or 42 index.
About state id values, you can also type the mnemonic constants STATE_... that you can find in MNEMONIC CONSTANTS list in Reference panel.
If you don't understand what is a "state-id" or Animation index you can interpret then like a number to signal what lara is doing.
For example following table show most important state-id:
Climbing: $38 , $39, $3A, $3B, $3C, $3d
Falling: $09, $1d
Jumping: $19, $1A, $1b, $1C, $03
Moing on all fours: $50, $51, $47, $48
Rolling: 5
Running: 1
Walking: 0
Monkey: $4b, $4c, $4d, $4e, $4f, $52, $53
Still, stand up: 2
Remark: the '$' sign means "hexadecimal value". You can use calculator of Windows in anvanced mode to convert hex in decimal. Anyway you can type above number directly in hex typing own with $ sing in front.
Anyway you can type the numbers also in decimal, of course.
The state-ids you type are used by engine to understand when your animation is allowed and when it's not.
Normally you'll set as state id the value "2" in this way your animation will be enabled only if lara is still, on land and stand up.
But you could create particular animation to perform only when lara is climbing a wall, in this case you should type all values for climbing: $38 , $39, $3A, $3B, $3C, $3d or only some of these values.
To discover all state id values or animation indices you can to use trng engine with Diagnostic=ENABLED in script.dat and see the animation and state id values, or you can use Wad Merger program and enter in Animtion Editor.
When you select an animation of lara you'll can see also her "State-id" value and Index of animation.