Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.
/ melonbomber Public archive

A Lua script for MechanicalMind/melonbomber that loads maps from bitmap files

License

Notifications You must be signed in to change notification settings

kendalharland/melonbomber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

melonbomber

A Lua script for MechanicalMind/melonbomber that loads maps from bitmap files

Setup

  1. Create the folder garrysmod/data/melonbomber. This is where bitmap data goes.
  2. Create the folder garrysmod/lua/melonbomber/maptypes. This is where your custom maptype scripts go. (See this page)
  3. Copy gridmap.lua to garrysmod/lua/includes/modules

Create a map

Create the map file

Maps are given as plaintext files. For example:

bbbbbbbb
b      b
b      b
b      b
bbbbbbbb

This creates a boring arena with a section of boxes in the corner.

The allowed characters are:

  • b: box
  • w: wall
  • h: hard box
  • e: explosive box

Save your map file to garrysmod/data/melonbomber/my_map.txt.

Create the Lua script

require("gridmap")

map.name = "MyMap"
map.description = "My custom map"

function map:generateMap(grid)
    map = gridmap.load_map_data("melonbomber/my_map.txt")
    gridmap.generate(grid, map)
end

Save the contents of this file to garrysmod/lua/melonbomber/maptypes/my_map.lua

About

A Lua script for MechanicalMind/melonbomber that loads maps from bitmap files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages