drawIcon – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search

Description of parameters and example would be nice --T_D 21:53, 19 August 2006 (CEST)

For a successful test insert the following code in the activation field of a trigger, set min/mid/max to 1 second (important!), and the expression to "true".
nul = ((finddisplay 12) displayCtrl 51) ctrlAddEventHandler
["Draw","(_this select 0) drawIcon [""iconStaticMG"",[1,0,0,1],getpos player, 24,24,getdir player,
""Player Vehicle"", false ,0.06,""TahomaB"", ""center""];"];
Remove line breaks in code if you copy!
Start the mission and open map. After at least one second you will see an icon on players position.
It's important to start script after init, so that the displays and controls are available. So if you forget to set min/mid/max to at least a second, you will see nothing.
--HeliJunkie 17:44, 19 October 2013 (CEST)