Platz Function PlatzSetBoundingBoxDimensions

From Uzebox Wiki
Jump to navigation Jump to search
Prototype

u8 PlatzSetBoundingBoxDimensions(platzActor *a, u8 wid, u8 hgt);

Description

Changes the actor's bounding box dimensions used for collision detection if it's safe to do so. It's not safe to do so if a collision would ensue.

Parameters
  • a: The actor whose bounding box dimensions should be altered.
  • wid: The width of the new bounding box in pixels.
  • hgt: The height of the new bounding box in pixels.
Returns
  • Non-zero if the change was applied successfully.
  • Zero if the change could not be applied.
Video Modes

3

Since

V0.3a

Example: Load new animations if it's safe to change the player's size.

platzActor p1;
 
if (PlatzSetBoundingBoxDimensions(&p1,24,16))
    LoadAnimations();