GetSpriteCollision
Flag = GetSpriteCollision(SpriteNumber)
 
Parameters:

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

    Flag = The Sprite collision status (0= off , 1 = collision is on)
 

      The GetSpriteCollision function returns the current collision status of this sprite. If the funtion returns a true (1) then this sprite has collision activated, if it's false (zero) then it doesn't.



FACTS:


      * More for information about sprite collision see: SpriteCollision



Mini Tutorial:


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


  
  
; Create Sprite #1
  CreateSprite 1
  
; Display the states
  Print "Collision State:"+Str$(GetSpriteCollision(1))
  Print "Collision Class:"+Bin$(GetSpriteCollisionClass(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
  

 
Related Info: GetSpriteCollisionClass | SpriteCollision | SpriteCollisionClass :
 


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