drawIcon3D: Difference between revisions
Jump to navigation
Jump to search
m (Text replace - "{{uc:{{PAGENAME}}}}" to "{{uc:{{PAGENAME}}}} {{uc:{{PAGENAME}}}}") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Draws an ingame icon at a given position. | | Draws an ingame icon at a given position. Command has to be executed each frame. Use [[onEachFrame]] or [[addMissionEventHandler]] "Draw3D" |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 37: | Line 37: | ||
|x1= <code>drawIcon3D ["targetIcon.paa", [1,1,1,1], | |x1= Icon and text:<code>[[onEachFrame]] { | ||
[[drawIcon3D]] ["targetIcon.paa", [1,1,1,1], [[getPos]] [[cursorTarget]], 1, 1, 45, "Target", 1, 0.05, "TahomaB"]; | |||
};</code>|= EXAMPLE1 | |||
|x2= Just text: | |||
<code>[[addMissionEventHandler]] ["Draw3D", { | |||
[[drawIcon3D]] ["", [1,0,0,1], [[position]] [[cursorTarget]], 0, 0, 0, "Target", 1, 0.05, "PuristaMedium"]; | |||
}];</code>|= EXAMPLE2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[drawLine3D]] |= SEEALSO | ||
| |= MPBEHAVIOUR | | |= MPBEHAVIOUR | ||
Line 50: | Line 57: | ||
<dl class='command_description'> | <dl class='command_description'> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on August 31, 2013 | |||
<dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]''' | |||
<dd class="note">As command syntax indicates, this command expects icon position in format [[Position]] meaning that over the land it expects [[PositionATL]] and over the sea [[PositionASL]]. Use additional [[ASLToATL]] and [[ATLToASL]] commands wherever is necessary. Alternatively use [[getPos]] or [[position]] commands, which will automatically adjust Z. | |||
To draw smooth moving icon for a moving object use [[visiblePosition]] and [[visiblePositionASL]] accordingly. | |||
<!-- Note Section END --> | <!-- Note Section END --> |
Revision as of 08:51, 31 August 2013
Description
- Description:
- Draws an ingame icon at a given position. Command has to be executed each frame. Use onEachFrame or addMissionEventHandler "Draw3D"
- Groups:
- Uncategorised
Syntax
- Syntax:
- drawIcon3D [texture, color, pos, width, height, angle, text, shadow, textSize, font]
- Parameters:
- [texture, color, pos, width, height, angle, text, shadow, textSize, font]: Array
- texture: String
- color: Color
- pos: Position
- width: Number
- height: Number
- angle: Number
- text: String
- shadow: Number
- textSize: Number
- font: String
- Return Value:
- Nothing
Examples
- Example 1:
- Icon and text:
onEachFrame { drawIcon3D ["targetIcon.paa", [1,1,1,1], getPos cursorTarget, 1, 1, 45, "Target", 1, 0.05, "TahomaB"]; };
- Example 2:
- Just text:
addMissionEventHandler ["Draw3D", { drawIcon3D ["", [1,0,0,1], position cursorTarget, 0, 0, 0, "Target", 1, 0.05, "PuristaMedium"]; }];
Additional Information
- See also:
- drawLine3D
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on August 31, 2013
- Killzone_Kid
- As command syntax indicates, this command expects icon position in format Position meaning that over the land it expects PositionATL and over the sea PositionASL. Use additional ASLToATL and ATLToASL commands wherever is necessary. Alternatively use getPos or position commands, which will automatically adjust Z. To draw smooth moving icon for a moving object use visiblePosition and visiblePositionASL accordingly.