MoveSpriteZ
MoveSpriteZ SpriteIndex, Zdist#
 
Parameters:

    SpriteIndex = The identifier of the sprite you wish to create
    Zdist# = The value to add to the Sprites Z position
Returns: NONE
 

      MoveSpriteZ changes the sprite current position by applying a change to the Z position of the sprite.




FACTS:


      * MoveSpriteZ does not alter the X or Y positions of this sprite. See MoveSpriteX, MoveSpriteY.

      * MoveSpriteZ can support sliding collision with the approriate SpriteCollisionMode





Mini Tutorial:


      Create a sprite, set it's position, move it and display its new position to the screen.

  
; Create the Sprite
  CreateSprite 1
  
; Set this sprites entities X and Y Positions to 100x,200y,300z
  PositionSpriteXYZ 1100,200,300
  
; Add 50 to this sprites Y Position.
  MoveSpriteZ 150
  
; 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
  350.0
  

 
Related Info: MoveSprite | MoveSpriteX | MoveSpriteY | PositionSprite | PositionSpriteX | PositionSpriteXYZ | PositionSpriteY | PositionSpriteZ :
 


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