IdaJS
    Preparing search index...

    Interface LifeFunctions

    LBA2 Life script functions, available in IdaJS.

    Life functions are available in javascript through ida.Life enum object. Life functions can be called using ida.lifef function.

    LifeOpcodes for numeric types reference, used in the life script.

    ida.Life

    interface LifeFunctions {
        LF_ACTION: 9;
        LF_ANGLE: 18;
        LF_ANGLE_OBJ: 45;
        LF_CARRY_BY: 16;
        LF_CARRY_OBJ_BY: 17;
        LF_CHOICE: 13;
        LF_COL: 0;
        LF_COL_DECORS: 22;
        LF_COL_DECORS_OBJ: 23;
        LF_COL_OBJ: 1;
        LF_COMPORTEMENT_HERO: 11;
        LF_CONE_VIEW: 7;
        LF_DISTANCE: 2;
        LF_DISTANCE_3D: 10;
        LF_DISTANCE_MESSAGE: 19;
        LF_ECHELLE: 14;
        LF_HIT_BY: 8;
        LF_HIT_OBJ_BY: 20;
        LF_L_TRACK: 5;
        LF_L_TRACK_OBJ: 6;
        LF_OBJECT_DISPLAYED: 44;
        LF_RAIL: 15;
        LF_REAL_ANGLE: 21;
        LF_USE_INVENTORY: 12;
        LF_ZONE: 3;
        LF_ZONE_OBJ: 4;
    }
    Index

    Properties

    LF_ACTION: 9

    Tests if the action key is currently being pressed.

    i8 - Action key was pressed.

    LF_ANGLE: 18

    Calculates the directional angle from this actor to another actor.

    u8

    i16 - Angle from this actor to another actor.

    LF_ANGLE_OBJ: 45

    Calculates the directional angle from another actor to this actor.

    u8

    i16 - Angle from another actor to this actor.

    LF_CARRY_BY: 16

    Identifies which actor is currently carrying this actor.

    i8 - Actor carrying this actor.

    LF_CARRY_OBJ_BY: 17

    Identifies which actor is being carried by another actor.

    u8

    i8 - Actor carrying another actor.

    LF_CHOICE: 13

    Gets the player's choice from the most recent dialogue menu.

    i16 - Choice made in last dialogue.

    LF_COL: 0

    Checks for collision between this actor and any other actor.

    i8 - Actor this actor collided with (or -1 if none).

    LF_COL_DECORS: 22

    Tests if this actor is currently colliding with decorative scenery.

    i8 - Whether this actor collides with scenery.

    LF_COL_DECORS_OBJ: 23

    Tests if another actor is currently colliding with decorative scenery.

    u8

    i8 - Whether another actor collides with scenery.

    LF_COL_OBJ: 1

    Checks for collision between a specific actor and any other actor.

    u8

    i8 - Actor another actor collided with (or -1 if none).

    LF_COMPORTEMENT_HERO: 11

    Gets Twinsen's current behavior/stance mode.

    i8 - Twinsen's stance.

    LF_CONE_VIEW: 7

    Checks if another actor is visible within this actor's cone of view.

    u8

    i16 - Distance to another actor, if they are within a 90-degree view cone.

    LF_DISTANCE: 2

    Calculates the 2D distance between this actor and another actor.

    u8

    i16 - 2D distance to another actor.

    LF_DISTANCE_3D: 10

    Calculates the 3D distance between this actor and another actor.

    u8

    i16 - 3D distance to another actor.

    LF_DISTANCE_MESSAGE: 19

    Measures distance to another actor for conversation range checking.

    u8

    i16 - Distance from another actor, if within an angle suitable for conversation.

    LF_ECHELLE: 14

    Checks the enabled state of a ladder zone.

    u8

    i8 - Whether a ladder zone is enabled.

    LF_HIT_BY: 8

    Identifies which actor last caused damage to this actor.

    i8 - Actor that last hit this actor.

    LF_HIT_OBJ_BY: 20

    Identifies which actor last caused damage to another actor.

    u8

    i8 - Actor that last hit another actor.

    LF_L_TRACK: 5

    Gets the current life script track number for this actor.

    u8 - Life script track active on this actor.

    LF_L_TRACK_OBJ: 6

    Gets the current life script track number for another actor.

    u8

    u8 - Life script track active on another actor.

    LF_OBJECT_DISPLAYED: 44

    Checks if an actor was rendered in the current frame.

    u8

    i8 - Whether this actor was drawn to the screen.

    LF_RAIL: 15

    Checks the enabled state of a rail zone.

    u8

    i8 - Whether a rail zone is enabled.

    LF_REAL_ANGLE: 21

    Calculates the clamped directional angle from this actor to another actor.

    u8

    i16 - Angle from this actor to another, clamped.

    LF_USE_INVENTORY: 12

    Checks if a specific inventory item is currently being used. Beware that this check might have side effects, the auto-used items will be used automatically when checked. By default only the translator is set to be auto-used in the vanilla game (see INVENT.cpp)

    u8

    i8 - Item being used.

    LF_ZONE: 3

    Determines which sceneric zone this actor is currently in.

    i8 - Index of sceneric zone this actor is within (or -1 if none).

    LF_ZONE_OBJ: 4

    Determines which sceneric zone another actor is currently in.

    u8

    i8 - Index of sceneric zone another actor is within (or -1 if none).