GetSpriteX
Xpos = GetSpriteX(SpriteIndex)
 
Parameters:

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

    Xpos = The current X position of this sprite
 

      The GetSpriteX function returns a sprites current X position.



FACTS:


      * Also see PositionSprite, MoveSprite




Mini Tutorial:


      Create a sprite, set it's XYZ positions, then read and display its position to the screen.

  
  
  
; Create the Sprite
  CreateSprite 1
  
; Set this sprites entities X and Y Positions to 100x,200y
  PositionSpriteXYZ 1100,200,300
  
; Read and display sprite 1's position X,Y and Z position to the screen.
  Print GetSpriteX(1)
  Print GetSpriteY(1)
  Print GetSpriteZ(1)
  
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output.

  
  100.0
  200.0
  300.0
  


 
Related Info: GetSpriteOldX | GetSpriteOldY | GetSpriteOldZ | GetSpriteY | GetSpriteZ | MoveSprite | MoveSpriteX | MoveSpriteY | MoveSpriteZ | PositionSprite | PositionSpriteX | PositionSpriteXYZ | PositionSpriteY | PositionSpriteZ :
 


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