parameters inside brackets are optional;
-
constantsTR_ITR_I_DEMOTR_I_UBTR_IITR_II_DEMOTR_IIITR_IVTR_IV_DEMOTR_VTR_UNKNOWNGAME_1GAME_1_1GAME_1_5GAME_2GAME_2_1GAME_2_5GAME_3GAME_3_5GAME_4GAME_4_1GAME_5GF_OP_PICTUREGF_OP_LISTSTARTGF_OP_LISTENDGF_OP_STARTFMVGF_OP_STARTLEVELGF_OP_STARTCINEGF_OP_LEVELCOMPLETEGF_OP_STARTDEMOGF_OP_JUMPTOSEQUENCEGF_OP_ENDSEQUENCEGF_OP_SETTRACKGF_OP_ENABLESUNSETGF_OP_LOADINGPICGF_OP_DEADLYWATERGF_OP_REMOVEWEAPONSGF_OP_GAMECOMPLETEGF_OP_CUTANGLEGF_OP_NOFLOORGF_OP_ADDTOINVENTORYGF_OP_LARASTARTANIMGF_OP_NUMSECRETSGF_OP_KILLTOCOMPLETEGF_OP_REMOVEAMMOITEM_TYPE_SYSTEMITEM_TYPE_SUPPLYITEM_TYPE_QUESTITEM_COMPASSITEM_PASSPORTITEM_LARAHOMEITEM_VIDEOITEM_AUDIOITEM_CONTROLSITEM_LOADITEM_SAVEITEM_MAPTR_FD_TRIGTYPE_TRIGGERTR_FD_TRIGTYPE_PADTR_FD_TRIGTYPE_SWITCHTR_FD_TRIGTYPE_KEYTR_FD_TRIGTYPE_PICKUPTR_FD_TRIGTYPE_HEAVYTR_FD_TRIGTYPE_ANTIPADTR_FD_TRIGTYPE_COMBATTR_FD_TRIGTYPE_DUMMYTR_FD_TRIGTYPE_ANTITRIGGERTR_FD_TRIGTYPE_HEAVYSWITCHTR_FD_TRIGTYPE_HEAVYANTITRIGGERTR_FD_TRIGTYPE_MONKEYTR_FD_TRIGTYPE_SKELETONTR_FD_TRIGTYPE_TIGHTROPETR_FD_TRIGTYPE_CRAWLDUCKTR_FD_TRIGTYPE_CLIMBTR_FD_TRIGFUNC_OBJECTTR_FD_TRIGFUNC_SET_CAMERATR_FD_TRIGFUNC_UWCURRENTTR_FD_TRIGFUNC_FLIPMAPTR_FD_TRIGFUNC_FLIPONTR_FD_TRIGFUNC_FLIPOFFTR_FD_TRIGFUNC_SET_TARGETTR_FD_TRIGFUNC_ENDLEVELTR_FD_TRIGFUNC_PLAYTRACKTR_FD_TRIGFUNC_FLIPEFFECTTR_FD_TRIGFUNC_SECRETTR_FD_TRIGFUNC_CLEARBODIESTR_FD_TRIGFUNC_FLYBYTR_FD_TRIGFUNC_CUTSCENEENTITY_STATE_ENABLEDENTITY_STATE_ACTIVEENTITY_STATE_VISIBLEENTITY_STATE_COLLIDABLEENTITY_STATE_DELETEDENTITY_TYPE_SPAWNEDENTITY_TYPE_GENERICENTITY_TYPE_INTERACTIVEENTITY_TYPE_TRIGGER_ACTIVATORENTITY_TYPE_HEAVYTRIGGER_ACTIVATORENTITY_TYPE_PICKABLEENTITY_TYPE_TRAVERSEENTITY_TYPE_TRAVERSE_FLOORENTITY_TYPE_DYNAMICENTITY_TYPE_ACTORENTITY_CALLBACK_NONEENTITY_CALLBACK_ACTIVATEENTITY_CALLBACK_DEACTIVATEENTITY_CALLBACK_COLLISIONENTITY_CALLBACK_STANDENTITY_CALLBACK_HITENTITY_CALLBACK_ATTACKENTITY_CALLBACK_SHOOTPARAM_HEALTHPARAM_AIRPARAM_STAMINAPARAM_WARMTHPARAM_HIT_DAMAGEPARAM_EXTRA1PARAM_EXTRA2PARAM_EXTRA3PARAM_EXTRA4PARAM_LASTINDEXANIMATION_KEY_INITANIMATION_KEY_DEADSTATE_FUNCTIONS_LARASTATE_FUNCTIONS_BATSTATE_FUNCTIONS_WOLFSTATE_FUNCTIONS_BEARSTATE_FUNCTIONS_RAPTORSTATE_FUNCTIONS_TREXSTATE_FUNCTIONS_LARSONSTATE_FUNCTIONS_PIERRESTATE_FUNCTIONS_LIONSTATE_FUNCTIONS_GORILLASTATE_FUNCTIONS_CROCODILESTATE_FUNCTIONS_RATSTATE_FUNCTIONS_CENTAURSTATE_FUNCTIONS_PUMASTATE_FUNCTIONS_WINGED_MUTANTSTATE_FUNCTIONS_COWBOYSTATE_FUNCTIONS_SKATEBOARDISTSTATE_FUNCTIONS_MRTSTATE_FUNCTIONS_TORSO_BOSSSTATE_FUNCTIONS_NATLAANIM_NORMAL_CONTROLANIM_LOOP_LAST_FRAMEANIM_FRAME_LOCKANIM_FRAME_REVERSEANIM_TYPE_BASEANIM_TYPE_WEAPON_LHANIM_TYPE_WEAPON_RHANIM_TYPE_WEAPON_THANIM_TYPE_MISK_1ANIM_TYPE_MISK_2ANIM_TYPE_MISK_3ANIM_TYPE_MISK_4BODY_PART_BODY_LOWBODY_PART_BODY_UPPERBODY_PART_HEADBODY_PART_LEFT_HAND_1BODY_PART_LEFT_HAND_2BODY_PART_LEFT_HAND_3BODY_PART_RIGHT_HAND_1BODY_PART_RIGHT_HAND_2BODY_PART_RIGHT_HAND_3BODY_PART_LEFT_LEG_1BODY_PART_LEFT_LEG_2BODY_PART_LEFT_LEG_3BODY_PART_RIGHT_LEG_1BODY_PART_RIGHT_LEG_2BODY_PART_RIGHT_LEG_3BODY_PART_TAILZONE_TYPE_ALLZONE_TYPE_1ZONE_TYPE_2ZONE_TYPE_3ZONE_TYPE_4ZONE_TYPE_FLYMOVE_STATIC_POSMOVE_KINEMATICMOVE_ON_FLOORMOVE_WADEMOVE_QUICKSANDMOVE_ON_WATERMOVE_UNDERWATERMOVE_FREE_FALLINGMOVE_CLIMBINGMOVE_MONKEYSWINGMOVE_WALLS_CLIMBMOVE_DOZYMOVE_FLYTRIGGER_OP_ORTRIGGER_OP_XORTRIGGER_OP_AND_INVCHARACTER_STATE_DEADCHARACTER_STATE_WEAPONTICK_IDLETICK_STOPPEDTICK_ACTIVECOLLISION_SHAPE_BOXCOLLISION_SHAPE_BOX_BASECOLLISION_SHAPE_SPHERECOLLISION_SHAPE_TRIMESHCOLLISION_SHAPE_TRIMESH_CONVEXCOLLISION_SHAPE_SINGLE_BOXCOLLISION_SHAPE_SINGLE_SPHERECOLLISION_NONECOLLISION_GROUP_ALLCOLLISION_MASK_ALLCOLLISION_GROUP_STATIC_ROOMCOLLISION_GROUP_STATIC_OBLECTCOLLISION_GROUP_KINEMATICCOLLISION_GROUP_TRIGGERSCOLLISION_GROUP_CHARACTERSCOLLISION_GROUP_VEHICLECOLLISION_GROUP_BULLETSCOLLISION_GROUP_DYNAMICSCOLLISION_GROUP_DYNAMICS_NIENTITY_TRIGGERING_ACTIVATEDENTITY_TRIGGERING_DEACTIVATEDENTITY_TRIGGERING_NOT_READY -
scriptls(dir_path, filter)- shows files and [dir's] in dir_path where item name corresponds to filter (chars, *, ?).addFont(font_index, font_path, font_size)- creates font with given access index.removeFont(font_index)- deletes font by given access index.addFontStyle(index, R, G, B, A, shadow)- creates font style with given access index.removeFontStyle(index)- deletes font style by given access index.bindKey(action_id, key_id1, (key_id2))- bind action and keyboard, joystick, mouse key.getActionState(action_id)- .getActionChange(action_id)- .
-
script_audioplaySound(sound_id, (entity_id))- .stopSound(sound_id, (entity_id))- .playStream(stream_id, (mask))- .
-
script_charactercharacterCreate(entity_id)- .setCharacterBones(entity_id, head_bone, torso_bone, l_hand_first, l_hand_last, r_hand_first, r_hand_last))- .setCharacterMoveSizes(entity_id, height, min_step_up_height, max_step_up_height, max_climb_height, fall_down_height)- .setCharacterStateControlFunctions(entity_id, funcs_id)- .setCharacterKeyAnim(entity_id, anim_type, anim_key_id)- .setCharacterTarget(entity_id, (target_id))- .getCharacterTarget(entity_id)- .setCharacterAIParams(entity_id, zone, zone_type)- .setCharacterPathTarget(entity_id, target_id)- .setCharacterParam(entity_id, param, value, (max_value))- .getCharacterParam(entity_id, param_id)- .changeCharacterParam(entity_id, param_id, delta)- .getCharacterCombatMode()- is weapons ready.addCharacterHair(entity_id, hair_setup_table)- .resetCharacterHair(entity_id)- .setCharacterRagdollSetup(entity_id, ragdoll_setup_table)- .setCharacterDefaultRagdoll(entity_id, anim, frame)- .setCharacterRagdollActivity(entity_id, value)- .setCharacterState(entity_id, state_id, value)- .getCharacterState(entity_id, state_id)- .setCharacterClimbPoint(entity_id, x, y, z)- for game saving.getCharacterClimbPoint(entity_id)- .getCharacterCurrentWeapon(entity_id)- .setCharacterCurrentWeapon(entity_id, weapon_id)- .
-
script_entityactivateEntity(object_id, activator_id, trigger_mask, trigger_op, trigger_lock, trigger_timer)- .deactivateEntity(object_id, activator_id)- .noFixEntityCollision(entity_id, value)- .noEntityMove(entity_id, value)- .enableEntity(entity_id)- .disableEntity(entity_id)- .getEntitySectorFlags(entity_id)- .getEntitySectorIndex(entity_id)- .getEntitySectorMaterial(entity_id)- .getEntityBoxID(entity_id, dx_sector, dy_sector)- .- `setEntityActivationOffset(entity_id, (dx, dy, dz), (max_delta)) - .
getEntityActivationOffset(entity_id)- return dx, dy, dz, max_delta - .setEntityActivationDirection(entity_id, dx, dy, dx, (cos_max_delta_angle))- .getEntityActivationDirection(entity_id)- return dx, dy, dx, cos_max_delta_angle.getEntityVector(entity_id1, entity_id2)- .getEntityDistance(entity_id1, entity_id2)- .getEntityDirDot(entity_id1, entity_id2)- .getEntityRoom(entity_id)- .getEntityPosition(entity_id)- return x, y, z, ax, ay, az.getEntityAngles(entity_id)- return ax, ay, az.getEntityScaling(entity_id)- .setEntityPosition(entity_id, x, y, z, (fi_x, fi_y, fi_z))- .setEntityAngles(entity_id, fi_x, (fi_y, fi_z))- .setEntityScaling(entity_id, x_scaling, y_scaling, z_scaling)- .moveEntityGlobal(entity_id, x, y, z)- .moveEntityLocal(entity_id, dx, dy, dz)- .moveEntityToSink(entity_id, sink_id)- .moveEntityToEntity(moved_entity_id, target_entity_id, speed, (ignore_z))- .rotateEntity(entity_id, rot_x, (rot_y, rot_z))- .getEntitySpeed(entity_id)- .getEntitySpeedLinear(entity_id)- .setEntitySpeed(entity_id, speed_x, speed_y, speed_z)- .setEntityLinearSpeed(entity_id, speed)- .setEntityBodyPartFlag(entity_id, bone_id, body_part_flag)- .addItem(entity_id, item_id, (items_count = pickup_count))- .removeItem(entity_id, item_id, items_count)- .removeAllItems(entity_id)- .getItemsCount(entity_id, item_id)- .getItems(entity_id)- .canTriggerEntity(entity_id1, entity_id2)- .entityRotateToTriggerZ(entity_id1, entity_id2)- .entityRotateToTrigger(entity_id1, entity_id2)- .entityMoveToTriggerActivationPoint(entity_id1, entity_id2)- .getEntityVisibility(entity_id)- .setEntityVisibility(entity_id, value)- .getEntityEnability(entity_id)- .getEntityActivity(entity_id)- .setEntityActivity(entity_id, value)- .getEntityTriggerLayout(entity_id)- return mask, event, lock.setEntityTriggerLayout(entity_id, layout) or (entity_id, mask, event, once)- .setEntityLock(entity_id, value)- .getEntityLock(entity_id)- .setEntityEvent(entity_id, value)- .getEntityEvent(entity_id)- .setEntityMask(entity_id, value)- .getEntityMask(entity_id)- .setEntitySectorStatus(entity_id, value)- .getEntitySectorStatus(entity_id)- .setEntityOCB(entity_id, value)- .getEntityOCB(entity_id)- .setEntityFlags(entity_id, state_flags, type_flags, callback_flags)- .getEntityFlags(entity_id)- return state_flags, type_flags, callback_flags.setEntityTypeFlag(entity_id, type_flag, (value))- .getEntityTypeFlag(entity_id, (type_flag))- .setEntityStateFlag(entity_id, state_flag, (value))- .getEntityStateFlag(entity_id, (state_flag))- .setEntityCallbackFlag(entity_id, callback_flag, (value))- .getEntityCallbackFlag(entity_id, (callback_flag))- .setEntityTimer(entity_id, value)- .getEntityTimer(entity_id)- .setEntityMoveType(entity_id, value)- .getEntityMoveType(entity_id)- .setEntityRoomMove(entity_id, room_id, move_type, dir_flag)- heavy, for save / load.setEntityCollision(entity_id, val)- .setEntityBoneCollision(entity_id, bone_id, val)- .setEntityGhostCollisionShape(entity_id, shape_index, min_x, min_y, min_z, max_x, max_y, max_z)- .setEntityCollisionFlags(entity_id, collision_group, collision_shape, collision_mask)- .setEntityCollisionGroupAndMask(entity_id, collision_group, collision_mask)- .resetRigidBodies(entity_id)- .createGhosts(entity_id)- .getEntityGlobalMove(entity_id, dx, dy, dz)- .getEntityCollisionFix(entity_id, filter)- return has_collision, x, y, z.getEntityMoveCollisionFix(entity_id, filter, dx, dy, dz)- return has_collision, x, y, z.getEntityRayTest(entity_id, filter, mx, my, mz, (dx, dy, dz))- return has_collision, x, y, z.getEntitySphereTest(entity_id, filter, r, mx, my, mz, (dx, dy, dz))- return has_collision, x, y, z.dropEntity(entity_id, time, (only_room))- .pushEntityBody(entity_id, body_number, h_force, v_force, reset_flag)- .setEntityBodyMass(entity_id, body_number, (mass / each body mass))- .lockEntityBodyLinearFactor(entity_id, body_number, (vertical_factor))- .
-
script_skeletal_modelsetStateChangeRange(model_id, anim_num, state_id, dispatch_num, start_frame, end_frame, (next_anim, next_frame))- .getEntityModelID(entity_id, (anim_id))- .getEntityAnimState(entity_id, anim_type_id)- .setEntityBaseAnimModel(entity_id, model_id)- .setModelBodyPartFlag(model_id, bone_id, body_part_flag)- .copyModelAnimations(model_dst_id, model_src_id)- .setEntityAnimState(entity_id, anim_type_id, next_state)- .setEntityAnimStateHeavy(entity_id, anim_type_id, next_state)- .getModelMeshCount(model_id)- .getEntityMeshCount(entity_id)- .setEntityMeshes(dest_entity_id, src_model_id)- .setEntitySkinMeshes(dest_entity_id, src_model_id)- .setModelMeshReplaceFlag(model_id, bone_num, flag)- .setEntityAnimFlag(entity_id, anim_type_id, anim_flag)- .setModelAnimReplaceFlag(model_id, bone_num, flag)- .copyMeshFromModelToModel(model_id1, model_id2, bone_num1, bone_num2)- .setEntityBoneVisibility(entity_id, bone_id, value)- .setEntityAnim(entity_id, anim_type_id, anim_num, frame_number, (curr_anim, curr_frame))- .getEntityAnim(entity_id, anim_type_id)- .entitySSAnimCopy(dest_id, src_id)- .entitySSAnimEnsureExists(entity_id, anim_type_id, model_id)- .entitySSAnimSetBoneMeshes(entity_id, bone_id, replace_id, slot_id)- .entitySSAnimSetTarget(entity_id, targeted_bone, target_x, target_y, target_z, bone_dir_x, bone_dir_y, bone_dir_z)- .entitySSAnimSetAxisMod(entity_id, bone_id, mod_x, mod_y, mod_z)- .entitySSAnimSetTargetingLimit(entity_id, bone_id, q_x, q_y, q_z, q_w)- .entitySSAnimSetCurrentRotation(entity_id, bone_id, q_x, q_y, q_z, q_w)- .entitySSAnimSetCurrentRotation(entity_id, anim_type_id, enabled, anim_ext_flags)- .entitySSAnimSetEnable(entity_id, anim_type_id, enabled)- .entitySSAnimGetEnable(entity_id, anim_type_id)- .
-
script_worldsetSectorFloorConfig(room_id, index_x, index_y, penetration_config, diagonal_type, floor, z0, z1, z2, z3)- tune room sector collision geometry on level loading.setSectorCeilingConfig(room_id, index_x, index_y, penetration_config, diagonal_type, ceiling, z0, z1, z2, z3)- tune room sector collision geometry on level loading.setSectorPortal(room_id, index_x, index_y, portal_room_id)- .setSectorFlags(room_id, index_x, index_y, fp_flag, ft_flag, cp_flag, ct_flag)- .sameRoom(entity_id1, entity_id2)- true if entity1.room == entity2.room.similarSector(entity_id, dx, dy, dz, ignore_doors, (ceiling))- .getSectorHeight(entity_id, (ceiling), (dx, dy, dz))- .sectorTriggerClear(room_id, index_x, index_y)- delete trigger effects from sector.sectorAddTrigger(room_id, index_x, index_y, function, sub_function, mask, once, timer)- .sectorAddTriggerCommand(room_id, index_x, index_y, function, operands, once, (cam_index, cam_move, cam_timer))- .setGravity()- .getGravity()- .setSecretStatus(secret_id, (value))- .getSecretStatus(secret_id)- .addRoomToNearList(room_id, room_to_list_id)- .addRoomToOverlappedList(room_id, room_to_list_id)- .createBaseItem(item_id, model_id, world_model_id, type, count, (name))- .deleteBaseItem(item_id)- .getBaseItemInfo(item_id)- .getBaseItemInfoByWorldID(world_model_id)- .spawnEntity(model_id1, room_id, x, y, z, ax, ay, az, (custom_new_id))- .deleteEntity(entity_id)- do not use in event handler functions.getLevel()- return loaded level id.gameflowSend(opcode, param)- .setGame(gameversion, (level_id))- .loadMap(map_name, game_id, level_id)- .setPlayer(entity_id)- .setGlobalFlipState(flip_state)- heavy, for TR1 save / load.setFlipState(flip_index, flip_state)- .setFlipMap(flip_index, flip_mask, flip_operation)- .getFlipState(flip_index)- .setRoomActiveContent(room_id1, room_id2)- heavy, for save / load.setRoomStaticEnability(room_id, static_id, value)- .setBoxBlocked(box_id, value)- for ai path blocking by doors.genUVRotateAnimation(model_id)- for anim textures generation on level loading.playFlyby(flyby_id, once)- .setCameraFrame(lerp)- rewind current flyby camera.setCinematicTransform(x, y, z, (az), (ax), (ay))- set cutscene transform.setCameraViewDistance(distance)- .setCameraPos(x, y, z)- .setCameraAngles(az, ax, ay)- .cameraLookAt(x, y, z)- .playVideo(video_file_path)- .