HPL3/Areas/Trigger Area

From Frictional Wiki
< HPL3
Revision as of 19:54, 10 March 2021 by M654 (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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;
}