Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

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()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.