SetCollisionMask
SetCollisionMask

Sets the collision mask of the JAM object.

bSuccess = myJAM.SetCollisionMask( Image_Index )
bSuccess = myJAM.SetCollisionMask( Image_Name )
bSuccess = myJAM.SetCollisionMask( Surface )

Return value
TRUE if the mask was set successfully, otherwise FALSE.

Parameters
  • Image_Index
    The index number of a picture in the Pictures bank to use as the collision mask
  • Image_Name
    The name of a picture in the Pictures bank to use as the collision mask
  • Surface
    A surface object to use as the collision mask
Comments

The collision mask follows the main background.
The type of a point is determined by it's colour:
  • BLACK (transparent)
    The point is clear
  • WHITE
    The point is an obstacle
  • BLUE
    The point is a platform
  • YELLOW
    The point is a ladder
This list could be expanded in later versions if necessary.

See also
JAM:GetCollisionMask
JAM:SetMainBackground



JAM © 2005 no one in partiular
Project started by David Evans in 2005