GetSpriteCollisionMode
Mode = GetSpriteCollisionMode(SpriteNumber)
 
Parameters:

    SpriteNumber = The Index of the sprite you wish to query
Returns:

    Mode = The Collision Mode value
 

      The GetSpriteCollisionMode function returns the current collision mode value of this sprite.



FACTS:


      * See SpriteCollisionMode




Mini Tutorial:


      This example creates a sprite, then displays the default collision state, collision class and Collision mode values from it.


  
; Create Sprite #1
  CreateSprite 1
  
; Set Sprite #1's collision mode to circle
  SpriteCollisionMode 1,2
  
; Set it's collision radius to 100
  SpriteCollisionRadius 1,100
  
; Display the states
  Print "Collision State:"+Str$(GetSpriteCollision(1))
  Print "Collision Class:"+Bin$(GetSpriteCollisionClass(1))
  Print "Collision  Mode:"+Str$(GetSpriteCollisionMode(1))
  Print "Collision  Radius:"+Str$(GetSpriteCollisionRadius(1))
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  
  
  
  
  




This example would output.

  
  Collision State:1
  Collision Class:%00000000000000000000000000000001
  Collision  Mode:2
  Collision Radius: 100
  

 
Related Info: GetSpriteCollision | GetSpriteCollisionClass | GetSpriteCollisionDebug | GetSpriteCollisionRadius | SpriteCollision | SpriteCollisionClass | SpriteCollisionDebug | SpriteCollisionMode | SpriteCollisionRadius :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com