GetLevelStatus
State = GetLevelStatus(MapIndex, LevelIndex)
 
Parameters:

    MapIndex = The Index of the Map you wish to query a level within
    LevelIndex = The index of the level you wish to query
Returns:

    State = The levels state flag (1= level exists, 0 = level doesn't exist)
 

      The GetLevelStatus function will returns the current state of a level within a map. If the function returns a true(1) the level exists, if it not it'll return a false (0) value.



FACTS:


      * none




Mini Tutorial:


      This example shows how to first create a Map & Level, then displays the size information about this level.



  
; Create a map with provision for 5 levels
  MyMap=NewMap(5)
  
; Create level 1 of size 100x,200y, and attach
; it To MYMap
  CreateLevel MyMap,1,100,200
  
; Display the Info about the map and it's level's
  Print "Map Index:"+Str$(MyMap)
  Print "# of Levels MYMap has:"+Str$(GetMapLevels(MyMap))
  
; Display the info about Level 1 in MyMap
  Print "Map Level Status:"     +Str$(GetLevelStatus(MyMap,1))
  Print "Map Level Width:"     +Str$(GetLevelWidth(MyMap,1))
  Print "Map Level Height:"     +Str$(GetLevelHeight(MyMap,1))
  
; Display the screen and wait for a key to be pressed
  Sync
  WaitKey
  



This example would output.

  
  Map Index:1
  # of Levels MYMap has:5
  Map Level Status:1
  Map Level Width:100
  Map Level Height:200
  

 
Related Info: CreateLevel | DeleteLevel | GetLevelHeight | GetLevelWidth | NewLevel :
 


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