View Single Post
Old 02-06-08, 18:01   #7
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,750
Default

EXAMPLE 5 - ROLL OUT OF CRAWLSPACE
-------------------------------------------------------------------

This move enables Lara to quickly roll out of a crawlspace, instead of turning around first and then crawl out.

Script command

Animation= 421, KEY1_JUMP, IGNORE, FAN_SET_NEUTRAL_STATE_ID + FAN_SET_FREE_HANDS, ENV_POS_HORTOGONAL + ENV_HOLE_FLOOR_IN_FRONT + ENV_POS_STRIP_1, IGNORE, IGNORE, 80


What does it all mean?

421
This is the animationnumber of the roll-out-of-crawlspace animation.
This animation is already present in the Lara objects of the revised wads.

KEY1_JUMP
The move is activated by pressing the JUMP button when Lara is facing the exit of the crawlspace.

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

FAN_SET_NEUTRAL_STATE_ID
From the Reference List of NG_Scripter:
This value forces the engine to change the real state-id number of your animation, replacing it with a neutral state-id.
The advantage is to avoid some interference created by tomb4 engine in some circustances.

(More details are in the Reference section of NG_Scripter.)

ENV_POS_HORTOGONAL + ENV_HOLE_FLOOR_IN_FRONT + ENV_POS_STRIP_1
ENV_POS_HORTOGONAL
To make sure Lara can only perform the move when she is facing the exit of the crawlspace directly.
She will not perform the move when she is in a diagonal position , because of this condition.

ENV_HOLE_FLOOR_IN_FRONT
To make sure Lara will only perform the move when there's a hole in the floor in front of her.

ENV_POS_STRIP_1
To make sure Lara will only perform the move when at the edge of the crawlspace, instead of on the entire tile.

IGNORE
The move can take place during the entire in-crawling-position animation, so no framenumber or other extra values needed.

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

80
StateID of Lara's crawling animation.


NOTE:
If you are also using FLEP, you can tick the patch "Enable crawlspace jump" and no scripting for this move is required.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 02-11-14 at 08:42.
Titak is offline