GetSpriteLocalInt
IntegerValue = GetSpriteLocalInt(SpriteNumber, Offset)
 
Parameters:

    SpriteNumber = The Index of the sprite you wish to query
    Offset = The offset address to read this data from
Returns:

    IntegerValue = The value you read from the sprites local data
 

     The GetSpriteLocalInt function reads a Integer value from a sprites local data bank.



FACTS:


     * See CreateSpriteLocals




Mini Tutorial:


      This example creates a sprites local data bank, fills it will various tidbits of test data, then reads this data back from the sprite.




  
; Create a Sprite
  CreateSprite 1
  
; Attach a Local data area, 100 bytes long To this sprite
  CreateSpriteLocals 1,100
  
; POke some data into this sprites local buffer
  
; POke a byte value 255 in at address 0
  SpriteLocalByte 1,0,255
  SpriteLocalWord 1,2,64000
  SpriteLocalInt 1,4,1234567
  SpriteLocalFloat 1,8,123.456
  SpriteLocalString 1,12,"Hello World"
  
  Print "Byte:"+Str$(GetSpriteLocalByte(1,0))
  Print "Word:"+Str$(GetSpriteLocalWord(1,2))
  Print "Integer:"+Str$(GetSpriteLocalInt(1,4))
  Print "Float:"+Str$(GetSpriteLocalFloat(1,8))
  Print "String:"+GetSpriteLocalString(1,12)
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  
  



This example wouldoutput something like this.

  
  Byte:255
  Word:64000
  Integer:1234567
  Float:123.456
  String:Hello World
  


 
Related Info: CreateSpriteLocals | DeleteSpriteLocals | GetSpriteLocalByte | GetSpriteLocalFloat | GetSpriteLocalPtr | GetSpriteLocalSize | GetSpriteLocalString | GetSpriteLocalWord | SpriteLocalByte | SpriteLocalFloat | SpriteLocalInt | SpriteLocalString | SpriteLocalWord :
 


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