PositionSpriteX
PositionSpriteX SpriteIndex, Xpos#
 
Parameters:

    SpriteIndex = The identifier of the sprite you wish to position
    Xpos# = X position of sprite
Returns: NONE
 

      PositionSpriteX sets the X coordinate of a sprite independently of it's Y and Z coordinates.



FACTS:


      * PositionSpriteX does not alter the Y or Z position of this sprite. See PositionSprite, PositionSpriteXYZ

      * Also See MoveSprite





Mini Tutorial:


      Create a sprite, set it's position, then display this position to the screen.

  
  
  
; Create the Sprite
  CreateSprite 1
  
; Set this sprites entities X and Y Positions to 100x,200y
  PositionSpriteX 1100
  
; 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
  0.0
  0.0
  

 
Related Info: GetSpriteOldX | GetSpriteOldY | GetSpriteOldZ | GetSpriteX | GetSpriteY | GetSpriteZ | PositionSprite | PositionSpriteXYZ | PositionSpriteY | PositionSpriteZ :
 


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