View Single Post
Old 02-06-08, 17:40   #2
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,752
Default

WHAT DO THE COMMAND/CONDITION FIELDS MEAN?
-------------------------------------------------------------------


Iíve made a short description about the required fields you need to fill in the Animation= command line. To give you a bit of a starter. J
For more detailed information you need to read the help file, as described above.


AnimIndex
This is the field where you put the number of the animation you want Lara to perform.
You can find the correct animation number using WADMerger Animation Editor.


KEY1_
This is where you put the key the player needs to press to make Lara perform the animation.
You can put more than one key in this field.
So if you want Lara to perform the animation only when the player presses arrow up and jump at the same time, you need to put KEY1_UP + KEY1_JUMP in this field.

In this tutorial Iím only using the default keyboard buttons.
You can also assign other keys, but this requires some extra scripting.

Possible keys for this field are:
KEY1_ACTION
KEY1_DOWN
KEY1_DRAW_WEAPON
KEY1_LEFT
KEY1_LOOK
KEY1_RELEASED
KEY1_RIGHT
KEY1_ROLL
KEY1_UP
KEY1_WALK

NOTE1:
The special value KEY1_RELEASED may be added to Key1 field to invert key conditions. When KEY1_RELEASED is present, the condition is true only when the specified keys are NOT down.
So you could use this to make Lara perform a certain animation when she is hanging onto something and the player lets go of Action.


KEY2_
Basically the same as the KEY1_ field but you can only put a small number of keys in this field:

KEY2_DASH
KEY2_DUCK
KEY2_USE_FLARE


FAN_ flags
You can set one or more flags FAN_ to set the behavior of the animation command.

An example of a FAN_flag is FAN_SET_FREE_HANDS.
This flag performs a specific action to inform the game engine that Laraís hands are free and she will therfore be able to hang, climb and pick up objects or weapons.


ENV_ Environment
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.

A few examples of ENV_ Environment conditions are:

ENV_HOLE_FLOOR_IN_FRONT
This ensures that Lara will only perform the animation when there is a hole in the floor in front of her.

ENV_FRAME_NUMBER
This can be used to ensure that the custom move will only start playing when Lara is at a specified frame number of a certain animation.
The framenumber should be inserted in the Distance for Env field.
The animationnumber (or StateID fo that animation) should be inserted in the StateId or AnimationId array field.

ENV_MONKEY_CEILING
This condition is true when lara is below monkeybars.
You can then set the distance to the monkeybars in the Distance for Env field.
The value that needs to be typed in the Distance for Env field is calculated with the following formula: MinClick + MaxClick * 256

For example if you want the condition to be true when the monkeybars are enclosed in range 3 (min) clicks upto 4 (max) click, you'll have to type the value
(3 + 4*256) = 1027 in the disctance field.
(This particular value is actually needed to make Lara perform the ladder-to-monkey move.)


Distance for Env
In this field you insert the values needed for some of the ENV_Environment conditions.
See also some of the examples in the ENV_Environment


Extra
This field may host different values in according with FAN flags.


StateId or AnimationId array
After the 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.

For example following table shows the most important state-id's:
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

NOTE 2:
The '$' sign means "hexadecimal value". You can use the Windows calculator in scientific mode to convert hex to decimal. You can also type the numbers in decimal but then you have to type the negative number, so animation 164 should be typed as -164.
The state-ids or animationnumbers you type in this field are used by the engine to determine when your animation is allowed and when it's not.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is online now