MapLevelQuantity
MapLevelQuantity MapIndex, NumbOfLevels
 
Parameters:

    MapIndex = The Index Identifier of the Map that you wish to create.
    NumbOfLevels = The Number of levels you like to setup within this map
Returns: NONE
 

      MapLevelQuantity lets you expand or contract the number of levels a map currently has provision for. The command is sensitive to the data, allowing you to expand the level table without lose, Of course, if you shrink the number levels in the table, then care should be taken to ensure your not deleting levels you need.



FACTS:


      * When shrinking the number of levels, MapLevelQuantity will delete all the level data associated with those levels.




Mini Tutorial:


      This example will create a map with provision for 10 levels. Display the max number of levels this map currently has provision for, resize this with MapLevelQuantity, and then display the resize number of levels available.

  
; Create map 1, with room for 10 levels.
  CreateMap 1,10
  
; Display the Info about this map.
  
  Print "Map Status:"+Str$(GetMapStatus(1))
  Print "Number Of Levels:"+Str$(GetMapLevels(1))
  
; Change the number of Levels this map has
  MapLevelQuantity 1,20
  
; Display this info
  Print "Number Of Levels After resize:"+Str$(GetMapLevels(1))
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output.

  
  Map Status:1
  Number Of Levels:10
  Number Of Levels After Resize:20
  

 
Related Info: CreateLevel | CreateMap | GetMapLevels | NewLevel :
 


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