PokeMapAnim
PokeMapAnim MapIndex, AnimIndex, FrameIndex, BlockIndex
 
Parameters:

    MapIndex = The Index of the Map that you wish to alter anim data within
    AnimIndex = The Index of the tile animation to store this block within
    FrameIndex = The position within the animation to store this block index
    BlockIndex = The block index you wish to store
Returns: NONE
 

      PokeMapAnim store a block index into an previously created block animation sequence.


FACTS:


      * None



Mini Tutorial:


      This example shows the hands on creation of a Map, and the basic creation of a map Anim. It then stores a series of block indexes with the anim and then displays the anim information back to the screen for you.


  
; ==============================
; Part 1 - Create Map
; ==============================
  
; Set Width & Height variables of the Map tiles
  TileWidth=16
  Tileheight=16
  
; Get a free Map index
  MyMap=GetFreeMap()
  
; Create a map with provision for 5 levels
  CreateMap MyMap,5
  
; ==============================
; Part 2 - Create Tile Animations
; ==============================
  
; Create Room for 5 Block Animations with this map
  MapAnimQuantity MyMap,5
  
; Create Anim 1,with space for 10 frames in the anim
  CreateMapAnim MyMap,1,10
  
; Poke some frames into the Anim 1
  For lp=0 To 10
     PokeMapAnim MyMap,1,lp,10+lp
  Next
  
; Display the Block Index within this anim
  
  For Frames=0 To GetMapAnimSize(myMap,1)
     Print "Frame #"+Str$(frames)+"  "+Str$(PeekMapAnim(myMap,1,Frames))
  Next
  
; Display the screen and loop back to the DO
  Sync
  WaitKey
  
  



This example would output.

  
  Frame #0 10
  Frame #1 11
  Frame #2 12
  Frame #3 13
  Frame #4 14
  Frame #5 15
  Frame #6 16
  Frame #7 17
  Frame #8 18
  Frame #9 19
  Frame #10 20
  

 
Related Info: CreateMapAnim | DeleteMapAnim | GetMapAnimStatus :
 


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