This is a simple utility file that allows you to load a png file map into another map while the game is playing.
Example:
Notes:Code:CMap@ map = getMap(); string mapPath = "Maps/RTDM/Community/Bastille.png"; string arenaName = "arena"; //used for naming the sector Vec2f position; CMap::Sector@ sector; if(map.getMarker("arena_location", position)) { uint offset = map.getTileOffset(position); //top left corner of arena to be spawned ArenaPNGLoader arenaLoader(offset, arenaName); arenaLoader.loadMap(map, mapPath); @sector = arenaLoader.sector; //the sector can be used for cleanup or finding things specific to the arena like markers and blobs. }
- Using the arena loader while running localhost will result in extremely funky behavior.
- You should keep track of the sector name or sector so that you can clean up the arena tiles/blobs at a later time when you are done with it.
- Using the map loader will not spawn tents or tdm_ruins. In order to do that use the sector and find the appropriate markers within the arena and create them.
- The arena loader class can change it's parent class to any other loader if you wish to extend its functionality.
-
Hey Guest, is it this your first time on the forums?Dismiss Notice
Visit the Beginner's Box
Introduce yourself, read some of the ins and outs of the community, access to useful links and information.
Arena Loader 2017-03-01
yo dog I heard you like maps so I put maps in your map so you can ???