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

EXAMPLE 3 - ROLL IN CRAWLSPACE
-------------------------------------------------------------------

Lara can perform a quick roll in a crawlspace, which makes her move forward much quicker than regular crawling.

The animations for it are already present in the Lara object of one of the Revised wads, so there’s no need to add it.


Script command

Animation= 218, IGNORE, $4000, FAN_KEEP_NEXT_STATEID + FAN_SET_FREE_HANDS_TEMP, ENV_MULT_CONDITION, 4, IGNORE, -222, -353, -354
MultEnvCondition= 4 ,ENV_NO_BLOCK_IN_FRONT, 256, IGNORE, ENV_NON_TRUE + ENV_HOLE_FLOOR_IN_FRONT, 512, IGNORE



What does it all mean?
As you can see you need two different scriptcommands to make this move work properly.

Animation=
218
Number of the roll-in-crawlspace animation.

IGNORE
No KEY1_ is assigned, so that’s why IGNORE is put in this field.

$4000
The hexadecimal value of the Sprint key.
You can also type KEY2_DASH instead.

Note:
The hexvalue of a certain key or condition is listed in the show _MNEMONIC CONSTANTS for new script commands list.

FAN_KEEP_NEXT_STATEID
This will make sure that Lara will go back to the stateID of her kneeling animations.

FAN_SET_FREE_HANDS_TEMP
This makes sure that Lara's hands go back to properly holding her weapons in case you perform this move with drawn weapons.

ENV_MULT_CONDITION
Since more ENV_Environment conditions are needed you have to use this condition.
It tells the engine to also use the MultEnvCondition= command where all the ENV_Environment conditions will be listed.

4
The number of the MultEnvCondition= command that should be used by the engine.

IGNORE
No Extra value/condition is needed so that’s why IGNORE is put in this field.

-222, -353, -354
These are the animationnumber of Lara’s kneeling animations.
These are the animation from which Lara can perform the move.

MultEnvCondition=
4
The number of the command, as assigned in the Animation= command.
The engine will now know to use this MultEnvCondition= in conjunction with the Animation= command.

ENV_NO_BLOCK_IN_FRONT, 256, IGNORE
ENV_Environment, Distance for ENV and Extra field for the conditions to prevent Lara from performing the roll when she is face to face with a wall/block at a distance of less than a block and a half.

ENV_NON_TRUE + ENV_HOLE_FLOOR_IN_FRONT, 512, IGNORE
ENV_Environment, Distance for ENV and Extra field for the conditions to prevent Lara from performing the roll when she is face to face with a hole in the floor which is equal to or deeper than 2 clicks.
So this move cannot be used to make Lara roll out of a crawlspace unless the crawlspace is only one click above the floor.


Screenshot

__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 30-12-14 at 11:01.
Titak is offline