GetSpriteHandleX
XHandle = GetSpriteHandleX(SpriteIndex)
 
Parameters:

    SpriteIndex = The number of the sprite you wish to check
Returns:

    XHandle = The offset along the X axis for this sprite
 

     The GetSpriteHandleX function returns the current X handle offset for this sprite.



FACTS:


     * See SpriteHandle for more information about sprite handles.




Mini Tutorial:


      Create a sprite, assign it a blank image, Center the sprites handle around this image, and read these settings back.

  
; Create a blank image 50x by 40y pixels..
  BlankImage=NewImage(50,40)
  
; Create a Sprite
  MySprite=NewSprite(0,0,BlankImage)
  
; assign this image to our previously created sprite
  SpriteImage MySprite,10
  
; center the sprites Handles for this image.
  CenterSpriteHandle MySprite
  
; Display the X and Y handles
  Print "Sprites X Handle:"+Str$(GetSpriteHandleX(MySprite))
  Print "Sprites Y Handle:"+Str$(GetSpriteHandleY(MySprite))
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output.

  
  Sprites X Handle:-25.0
  Sprites Y Handle:-20.0
  

 
Related Info: AutoCenterSpriteHandle | CenterSpriteHandle | GetSpriteHandleY | SpriteHandle :
 


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