HPL3/Areas/Trigger Area
< HPL3
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;
}