Defines an icon that is attached to the specified Editor Object, and which is visible on the 2D / 3D map (they are not shown on maps in user dialogs or on the mini-map).
With the new symbology in VBS3 20.2+ / VBS4 20.1+, you can no longer use the command to override map icons for units and vehicles.
Just like all the other draw commands, this one needs to be refreshed every frame, in order to be visible (see drawLine for details).
Icon size is specified as a "radius" (similar to setMarkerSize and setTriggerArea), where the dimension specified the half the final size. Icons that are not auto-scaled always keep their absolute size (in meters), and become smaller as the map is zoomed out, and bigger as it is zoomed in. The size of non-scaled icons though is smaller than specified, so to reach the exact, required size it must be multiplied by 1.28.
Auto-scaled icons always keep the same size in relation to the screen, and have their nominal size only at a ctrlMapScale of 1500 (to fill the whole screen height, an auto-scaled marker needs a height of about 450) (be aware though, that most icon bitmaps have an empty margin around the image itself, so the final size is still most likely somewhat smaller than specified). Auto-scaling can also be dependent on the current map scale, in order to prevent an icon to become unproportionally large when zooming out. In order to do that, the threshold zoom factor, multiplied by 5, should be specified using the
If an icon should keep its size (relative to the screen), until the ctrlMapScale reaches 0.5, then the
|Syntax:||map setDrawIcon [object, icon, color, offset, width, height, maintsize, autoscale, angle, identifier, shadow, text, is3D, drawline, priority]|
Creates a 2D icon at the unit location:
|See also:||removeDrawIcon, drawIcon|