MapDisplayUIControl: Difference between revisions
(Created page with "= Map Display UI Control = The key items for using a control are: == The Height Map == This is a 32 bit TGA texture. The blue channel is used for the height information, for...") |
No edit summary |
||
Line 7: | Line 7: | ||
== Using a Map Display == | == Using a Map Display == | ||
Once you have a heightmap and a map image, you can see the map ingame. Add the control to a UI txt file as normal - the below example could be the base for a custom campaign screen: | Once you have a heightmap and a map image, you can see the map ingame. Add the control to a UI txt file as normal - the below example could be the base for a custom campaign screen: | ||
< | <nowiki>[CAMPAIGNDISPLAY] | ||
level 4 | level 4 | ||
type mapdisplay | type mapdisplay | ||
Line 16: | Line 16: | ||
height 768 | height 768 | ||
script CAMPAIGN.BSF | script CAMPAIGN.BSF | ||
handler QUESTHANDLER</ | handler QUESTHANDLER</nowiki> |
Revision as of 17:56, 31 May 2016
Map Display UI Control
The key items for using a control are:
The Height Map
This is a 32 bit TGA texture. The blue channel is used for the height information, for ease of use it is recommended that the heightmap be greyscale. The default name for this should be HEIGHT.TGA and it should live in the DATA/UI/TEXTURES folder (generally this will be in the local campaign folder).
The Map Image
This image is used to texture the map, and can be any valid image format. The default name is MAP.TGA (or DDS, etc). It should be in the DATA/UI/TEXTURES folder also. Note that these texture names are customisable if needed using the scenario file (see below).
Using a Map Display
Once you have a heightmap and a map image, you can see the map ingame. Add the control to a UI txt file as normal - the below example could be the base for a custom campaign screen:
[CAMPAIGNDISPLAY] level 4 type mapdisplay file MAP.DAT x 0 y 0 width 1024 height 768 script CAMPAIGN.BSF handler QUESTHANDLER