Jump to: navigation, search



The minimap is always associated with the currently controlled character, meaning it is centered around that character. Possessing an NPC will re-center the map from a player's "real" character to that NPC.

The actual map part of a minimap GUI control requires a special texture field setting: MINIMAP. This setting actually begins the chain of events that leads to the minimap functionality.First, the engine renders a view of the world to the underlying texture; then it follows up with a method call to the $GUI system node: _onRenderMinimap(). The $GUI system node in turn farms this call out to the minimap control itself. At this point, basic functionality may be carried out by the default HeroEngine minimap system, or a game-specific minimap class can take over.  You may want to, for instance, add GUIControls as markers for mission waypoints or the locations of NPCs.

The call happens as frequently as every 100 milliseconds, which may be considered overkill. The HeroEngine _minimap class contains a DateTime field, lastMinimapUpdate, specifically intended to track and potentially limit the frequency of minimap updates. Checking this field against the value contained by SYSTEM.TIME.NOW allows you to prevent the minimap from firing more often than necessary. Note that if you are overriding the minimap's default behavior, you are responsible for updating this field's value at the end of the HE_onRenderMinimap method call.



For a room's geometry to appear on the minimap, that room needs to have its map layers chosen via the "Appearing In Maps" setting, located in the Room section of the Area panel. This is a positive integer, or a comma-delimited list thereof. A value of "0" or blank will prevent the room from appearing on the minimap.

The "Visible Maps (override)" setting determines which map layers are visible when this room is active. Again, it can be a single positive integer or a comma-separated list of them. A value of "0" or blank will use the "Appearing In Maps" setting as the "Visible Maps" setting.

At any given time, the minimap will display all map layers in the current room's Visible Maps list (or its Appearing In Maps list if Visible Maps is 0).


Assets themselves have a "viewability" property which defaults to WORLD_AND_MAP, but which can be set to map only, world only, or both. This is useful for things like roofs, where a setting of "WORLD_ONLY" will allow the player to see the roof in the viewport, but see inside the building/structure on the minimap.

Related functions

For use, the client external function:

EnableMiniMap(enabled as boolean)

needs to have been called with enabled set to TRUE

This is done automatically by the clean engine method of starting the minimap: $GUI._newMinimap(). If that method is not used or has been overridden (which is very possible, since the minimap it creates uses clean engine textures), the EnableMiniMap(enabled) function needs to be placed in the override, or similarly called whenever the minimap is first created.

Personal tools