drawIcon – Talk
Lou Montana (talk | contribs) m (Text replacement - "<br/>" to "<br>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>" to "<code style="display: block">") |
||
Line 4: | Line 4: | ||
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".<br> | 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".<br> | ||
<code>nul = ((finddisplay 12) displayCtrl 51) ctrlAddEventHandler <br>["Draw","(_this select 0) drawIcon [""iconStaticMG"",[1,0,0,1],getpos player, 24,24,getdir player,<br>""Player Vehicle"", false ,0.06,""TahomaB"", ""center""];"];</code> | <code style="display: block">nul = ((finddisplay 12) displayCtrl 51) ctrlAddEventHandler <br>["Draw","(_this select 0) drawIcon [""iconStaticMG"",[1,0,0,1],getpos player, 24,24,getdir player,<br>""Player Vehicle"", false ,0.06,""TahomaB"", ""center""];"];</code> | ||
''Remove line breaks in code if you copy!''<br> | ''Remove line breaks in code if you copy!''<br> | ||
Start the mission and open map. After at least one second you will see an icon on players position.<br> | Start the mission and open map. After at least one second you will see an icon on players position.<br> | ||
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. | 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. | ||
<br>--[[User:HeliJunkie|HeliJunkie]] 17:44, 19 October 2013 (CEST) | <br>--[[User:HeliJunkie|HeliJunkie]] 17:44, 19 October 2013 (CEST) |
Latest revision as of 11:52, 11 January 2023
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
Remove line breaks in code if you copy!
["Draw","(_this select 0) drawIcon [""iconStaticMG"",[1,0,0,1],getpos player, 24,24,getdir player,
""Player Vehicle"", false ,0.06,""TahomaB"", ""center""];"];
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)