GetSpriteCollisionRadius
Radius = GetSpriteCollisionRadius(SpriteNumber)
 
Parameters:

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

    Radius = The Collision Radius value of this sprite
 

      The GetSpriteCollisionRadius function returns the current collision radius value of this sprite.



FACTS:


      * See SpriteCollisionRadius & 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 | SpriteCollision | SpriteCollisionClass | SpriteCollisionMode :
 


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