Difference between revisions of "HPL3/Areas/Trigger Area"

From Frictional Wiki
Jump to navigation Jump to search
(Created page with "== Overview == The Trigger area runs a callback function when an entity collides with it. == Properties == === CC_Entities === This is a list of all entities that can trigger...")
(No difference)

Revision as of 19:54, 10 March 2021

Overview

The Trigger area runs a callback function when an entity collides with it.

Properties

CC_Entities

This is a list of all entities that can trigger the callback, separated by commas or spaces. player refers to the player character.

CC_Funcs

Includes a list of functions that will run when the area is triggered.

Callback function syntax

This is the basic syntax for a collision callback function.

bool FunctionName(const tString &in asParent, const tString &in asChild, int alState)
{
    if(alState == 1) // 1 = entering area, -1 = leaving area
    {
        // Insert code here
    }
    return false;
}