GetSpriteZ
Zpos = GetSpriteZ(SpriteIndex)
 
Parameters:

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

    Zpos = The current Z position of this sprite
 

      The GetSpriteZ function returns a sprites current Z position.



FACTS:


      * Also see PositionSprite, PositionSpriteXYZ, MoveSprite





Mini Tutorial:


      Create a sprite, set it's XYZ positions, then read and display it's 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 | GetSpriteX | GetSpriteY | MoveSprite | MoveSpriteX | MoveSpriteY | MoveSpriteZ | PositionSprite | PositionSpriteX | PositionSpriteXYZ :
 


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