+ -

05 - Collision Checking

Collision Checking lets an event detect when it physically touches another character's hitbox in real time. It's the core of the combat system: projectiles hitting enemies, enemies hitting the player, sword swings, traps... all of it runs through checkCollide.

Use case: A fireball event checks if it touches an event with notetag <enemy>. An enemy checks if it touches the player to deal contact damage. A trap checks if the player steps into it.

How to create a Collision Checking?

Simply call this conditional branch:

checkCollide(target, tags, cooldown)

target - Who is being checked.
tags - What to check collision against.
cooldown - (Optional) Collision cooldown in frames.

To see what target, tags and cooldown support, please visit the Manual page.


Examples

A fireball that hits enemies

In your fireball Prefab Event, add a Conditional Branch:

checkCollide(this, <enemy>)

This condition will return true if the fireball event itself touches an event with notetag <enemy>, but just once.

checkCollide(this, <enemy>, 1)

This will return true every other frame as long as the fireball is still touching the <enemy>.
English
Japanese