====== Scripts > Import heightmap tile ====== ^ Description | A script to import an area of the heightfield from a file. | ^ Author | [[user>Aaron]] | ^ Created | 2010/05/24 | ^ Requires | L3DT 11.07 beta 2 or later | ^ Download | {{:scripts:import heightmap tile.zs|import heightmap tile.zs}} | ===== Script contents ===== // Author: A. Torpy // Updated: 14 Jul 2011 hvar hMap set hMap assert hMap "Cannot get heightfield!" // exit immediately if HF is not initialised assert "Heightfield is not initialised!" // initialise and edit file selector filesel FS filesel.Init &FS true NULL "Heightfield files|*.hfz;*.hf2;*.hff;*.ter;*.bt;*.png;*.bmp;*.tga|All files (*.*)|*.*|" NULL NULL assert "Import aborted" // initialise and edit settings list int ls.x_offset ls.y_offset set ls.x_offset 0 set ls.y_offset 0 assert "Import aborted" // load the map tile map TileMap assert HF false true> "Error loading file" // store a backup L3DTio_Backup.BackupMap "HF" "Import HF tile" 0 "view.ShowMap \"HF\"" // overlay the tile assert "Error combining maps" // refresh the heightfield view.ShowMap "HF" ===== Comments ===== None.