GetSpriteCollisionWorld
WorldIndex = GetSpriteCollisionWorld(SpriteIndex)
 
Parameters:

    SpriteIndex = The index of the sprite you wish to set
Returns:

    WorldIndex = The index of the World this sprite us using for collision
 

     The GetSpriteCollisionWorld function return what world this sprite is using for it's sliding collision.


FACTS:


      * See SpriteCollisionMode & SpriteCollisionWorld





Mini Tutorial:


     This simple example creates a world, the creates a sprite and assigned this sprite the previously created world. It then displays this information back to the user.


  
  
; Create world #10
  CreateWorld 10
  
; create Sprite #50
  CreateSprite 50
  
; assign World #10 as sprite 50's sliding collision world
  SpriteCollisionWorld 50,10
  
;Set Sprites Collision mode to Sliding Collision
  SpriteCollisionMode 50,4
  
; Read the Sprites currcent Collision world
  Print GetSpriteCollisionWorld(50)
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  




This example would output.

  
  10
  

 
Related Info: CreateWorld | PartitionWorld | SpriteCollisionMode | SpriteCollisionWorld :
 


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