Last updated
Was this helpful?
Last updated
Was this helpful?
The hitbox
command creates an invisible collision detection area. It can be used to check if specific coordinates (like the mouse position) intersect with the defined area. Hitboxes are positioned relative to the current draw cursor position.
width
: Width of the hitbox in pixels
height
: Height of the hitbox in pixels
checkx
: X-coordinate to check for collision
checky
: Y-coordinate to check for collision
Or:
"show"
: Shows all hitboxes (for debugging)
"hide"
: Hides all hitboxes
The collided
variable is automatically set after each hitbox check
Hitboxes are invisible by default
Multiple hitboxes can be active at once
The collision area is a rectangle
Coordinates are checked against the entire hitbox area
Hitbox position is relative to the current draw cursor
The "show" and "hide" commands affect all hitboxes globally