This shows you the differences between two versions of the page.
Link to this comparison view
scripts:setdesignmaplayer [2013/08/22 00:09] 127.0.0.1 external edit |
scripts:setdesignmaplayer [2017/08/31 05:52] (current) |
- | ====== Scripts > SetDesignMapLayer ====== | + | ====== Scripts > DM_SetLayer ====== |
| | | |
- | ^ Description | Set the contents of a layer of the design map, using another map layer in the project. To be used with the [[scripts:GetDesignMapLayer]] script. | | + | ^ Description | Set the contents of a layer of the design map, using another map layer in the project. To be used with the [[scripts:GetDesignMapLayer|DM_GetLayer]] script. | |
| ^ Author | [[user>Aaron]] | | | ^ Author | [[user>Aaron]] | |
| ^ Created | 2010/05/24 | | | ^ Created | 2010/05/24 | |
| + | ^ Updated | 2016/05/12 | |
| ^ Requires | L3DT v2.9 beta 2 or later | | | ^ Requires | L3DT v2.9 beta 2 or later | |
- | ^ Download | {{:scripts:setdesignmaplayer.zs|SetDesignMapLayer.zs}} | | + | ^ Download | {{:scripts:DM_SetLayer.zs|DM_SetLayer.zs}} | |
- | <html><!--^ Updated | 2010/05/24 03:42 |--></html> | + | |
| | | |
| ===== Script contents ===== | | ===== Script contents ===== |
| | | |
| <code> | | <code> |
| + | // Author: A. Torpy |
| + | // Updated: 12 May 2016 |
| + | |
| hvar hDM | | hvar hDM |
| set hDM <GetMap "DM"> | | set hDM <GetMap "DM"> |
| // allow user to select layer | | // allow user to select layer |
| combosel CS | | combosel CS |
- | combosel.InitCS &CS "Altitude|PeakNoise|FracNoise|Cliffs|Erosion|Lakes|Climate|SpecType|SpecParam|" "Altitude" | + | combosel.Init &CS "Altitude|PeakNoise|FracNoise|Cliffs|Erosion|Lakes|Climate|SpecType|SpecParam|" "Altitude" NULL |
| if <not <EditUI &CS "Select DM layer">> | | if <not <EditUI &CS "Select DM layer">> |
| return 0 | | return 0 |
| set LayerID -1 | | set LayerID -1 |
| string LayerName | | string LayerName |
- | set LayerName <combosel.GetCurSel &CS> | + | set LayerName <combosel.GetCurSelA &CS> |
| if <iseq 0 <strcmp LayerName "Altitude">> | | if <iseq 0 <strcmp LayerName "Altitude">> |
| set LayerID 0 | | set LayerID 0 |
| </code> | | </code> |
| | | |
- | ===== Comments ===== | |
| | | |
- | None. | |