drawMap()
Purpose
Draw a tile map
Description
Draw a tile map previously loaded with loadMap()
Syntax
drawMap( )
Arguments
Example
// To view this map demo, please load the project "drawMap() Demo" from FUZE Programs.
// Maps must be stored in the project you wish to load them into.
maps = [
"map1",
"map2"
]
m = 0
press = false
loadMap( maps[m] )
setSpriteCamera( 0, 0, 2 )
loop
centreSpriteCamera( 0, 0 )
clear()
c = controls( 0 )
if !c.a then
press = false
endIf
drawMap()
if c.a and !press then
press = true
unloadMap()
m += 1
if m >= 2 then
m = 0
endIf
loadMap( maps[m] )
endIf
printAt( 0, 0, "Press A button to swap between maps" )
printAt( 0, 2, "Currently viewing: " + maps[m] )
update()
repeat
Associated Commands
collideMap(), drawMapLayer(), getMapArea(), getMapAreaNames(), getMapLocation(), getMapLocationNames(), loadMap(), unloadMap(), updateMap()