View Single Post
Old 18-01-09, 15:19   #8
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,752
Default

EXAMPLE 6 - LADDER TO CRAWLSPACE
-------------------------------------------------------------------

This move enables Lara to quickly squeeze into a crawlspace, when climbing a ladder.
In TR4, you first have to let go of the ladder, quickly grab it again and while Lara is still hanging from her hands (before she pulls up her legs again) you have to press DUCK and ARROW_UP to make her crawl into the crawlspace.
With this move you don't have to do all this. All you have to do is keep pressing ARROW_UP and Lara will crawl into the crawlspace.
You can find the animation for this move in a TRC LARA object.

Script command

Animation= 445, KEY1_ACTION, KEY2_DUCK, FAN_SET_FREE_HANDS, ENV_MULT_CONDITION, 2, -164 ;ladder to crawlspace
MultEnvCondition= 2, ENV_WALL_HOLE_IN_FRONT, 8738, IGNORE, ENV_CLIMB_WALL_IN_FRONT, IGNORE, IGNORE ;ladder to crawlspace



What does it all mean?

445
This is the animationnumber of the ladder-to-crawlspace animation.
The animation for this move can be found in a TRC Lara object.

KEY1_ACTION + KEY1_UP
The move is activated by pressing the ARROW_UP button when Lara has reached the entrance of a crawlspace, while climbing a wall.
Keep ACTION pressed to prevent Lara from falling down.

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

FAN_KEEP_NEXT_STATEID + FAN_SET_FREE_HANDS
FAN_SET_FREE_HANDS indicates that Lara's hands are empty and that she can therefore do things like climbing, crawling, etc.
More details are in the Reference section of NG_Scripter.

ENV_MULT_CONDITION
More than one ENV_*** is needed in this case, so the ENV_MULT_CONDITION needs to be used.

ENV_WALL_HOLE_IN_FRONT
Perform the move only when there's a hole in the wall in front of Lara.

8738
This number specifies some conditions of the hole in the walls.
It makes sure that Lara will only perform the move when the hole in the wall has the size of a crawlspace (2 clicks high).
So when Lara reaches a 1 click high hole, she won't climb into it, and when the hole is 4 clicks high, she will perform her regular ledge climb.
See the reference section in NG_Scripter to see how this numberwas determined.

ENV_CLIMB_WALL_IN_FRONT
Perform the move only when the wall in front of Lara is climbable.
(So the move can only be performed when Lara is on a climbable wall)

2
This is the number of the ENV_MULT_CONDITION (MultEnvCondition=) that should be used when performing this move.

-164
Lara's climbing animation.


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:02.
Titak is online now