ResizeMapAnim
ResizeMapAnim MapIndex, Animindex, NumbOfFrames
 
Parameters:

    MapIndex = The Index of the Map that you wish to resize an anim from
    Animindex = The Index of the animation to resize
    NumbOfFrames = The number of frames this animation shoudl have
Returns: NONE
 

ResizeMapAnim changes the 'number of frames' (the size) of a block anim sequence. The command is sensitive to existing data so expanding an animation will not effect previous information, however if you shrink an animation then the removed data from the end of the sequence will be lost.



FACTS:


* none




Mini Tutorial:


This example shows creates a map, then adds provision for some block animations. Next it creates an Block Animation, resizes it while displays it's size both, before and after.


  
; ==============================
; Part 1 - Create Map
; ==============================
; 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 in this map
  MapAnimQuantity MyMap,5
  
; Create Anim 1,with space for 10 frames in the anim
  CreateMapAnim MyMap,1,10
  
; Display the status of this anim
  Print GetMapAnimSize(Mymap,1)
  
  
; Resize Anim 1,with space for 20 frames
  ResizeMapAnim MyMap,1,20
  
; Display the status of this anim
  Print GetMapAnimSize(Mymap,1)
  
; Display the screen and wait for key press
  Sync
  WaitKey
  



This example would output.

  
  10
  20
  

 
Related Info: CreateMapAnim | DeleteMapAnim | GetLevelStatus :
 


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