BIS fnc drawAO: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Changed formatting for examples.)
m (Fix SQF)
 
(55 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Map and Markers


|1.00|= Game version
|descr= Draws a dashed line around the outer edges of a trigger.
____________________________________________________________________________________________


| Draws a dashed line around the outer edges of a trigger. |= Description
|s1= [triggers, distance] call [[BIS_fnc_drawAO]]
____________________________________________________________________________________________


| <nowiki>[[triggerName],''distance'']</nowiki> call '''BIS_fnc_drawAO'''; |= Syntax
|p1= triggers: [[Object]] or [[Array]] - trigger or list of triggers that indicate AO


|p1= [[Array]] - List of triggers that indicate AO.
|p2= distance: [[Number]] - (Optional, default 50) number that decides distance between each new line drawn
*[[Triggers|Trigger]] - Single trigger's name that indicates AO. Alternative if only one AO is used.
|=
|p2= [[Number]] - Number that decides distance between each new line drawn. ''(Optional, default 50)'' |=


| [[Nothing]] |= Return value
|r1= [[Nothing]]
____________________________________________________________________________________________


|x1= <code>[Trigger1] call BIS_fnc_drawAO; // Draws a dashed line around trigger1's outer edge, with 50m between each line.</code> |=
|x1= <sqf>[Trigger1] call BIS_fnc_drawAO; // draws a dashed line around trigger1's outer edge, with 50m between each line</sqf>
|x2= <code>[Trigger1,10] call BIS_fnc_drawAO; // Draws a dashed line around trigger1's outer edge, with 10m between each line.</code> |=
|x3= <code><nowiki>[[Trigger1,Trigger2]]</nowiki> call BIS_fnc_drawAO; // Draws dashed lines around multiple triggers, useful for multiple AOs in one mission.</code> |=
____________________________________________________________________________________________


| |= See also
|x2= <sqf>[Trigger1, 10] call BIS_fnc_drawAO; // draws a dashed line around trigger1's outer edge, with 10m between each line</sqf>


|x3= <sqf>[[Trigger1, Trigger2]] call BIS_fnc_drawAO; // draws dashed lines around multiple triggers, useful for multiple AOs in one mission</sqf>
|seealso=
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= Tryteyker-
<!-- Note Section BEGIN -->
|timestamp= 20140928171600
|text= It is worth noting that the size, color and other attributes that the line may have are dependant on the trigger itself.
The crucial attributes for the function to work properly seem to be the following:
: Activation: Anybody OR side player
: Size: Has to be bigger than 50x50 to be visible (below 50x50 it will not work properly as the function increments in 50 for each new line)


<!-- Note Section END -->
The following attributes are saved by the function once it is called, all attributes originating from trigger:
</dl>
<sqf>
 
private _triggerPos = position _x;
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Map|{{uc:drawAO}}]]
[[Category:Functions|{{uc:drawAO}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:drawAO}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on September 28, 2014 - 17:16 (UTC)</dd>
<dt class="note">[[User:Tryteyker-|Tryteyker-]]</dt>
<dd class="note">
It is worth noting that the size, color and other attributes that the line may have are dependant on the trigger itself. The crucial attributes for the function to work properly seem to be the following:
<br>
<code>
Activation: Anybody OR side player<br>
Size: Has to be bigger than 50x50 to be visible (below 50x50 it will not work properly as the function increments in 50 for each new line)
</code>
<br>
The following attributes are saved by the function once it is called, all attributes originating from trigger:<br>
<code>
_triggerPos = [[position]] _x;
_triggerPosX = _triggerPos select 0;
_triggerPosX = _triggerPos select 0;
_triggerPosY = _triggerPos select 1;
_triggerPosY = _triggerPos select 1;
_triggerArea = [[triggerarea]] _x;
_triggerArea = triggerArea _x;
_triggerSizeX = _triggerArea select 0;
_triggerSizeX = _triggerArea select 0;
_triggerSizeY = _triggerArea select 1;
_triggerSizeY = _triggerArea select 1;
Line 65: Line 44:
_triggerDir = _triggerArea select 2;
_triggerDir = _triggerArea select 2;
_triggerType = _triggerArea select 3;
_triggerType = _triggerArea select 3;
_triggerText = [[triggerText]] _x;
_triggerText = triggerText _x;
_triggerActivation = [[triggeractivation]] _x select 0;
_triggerActivation = triggerActivation _x select 0;
_triggerPresent = triggeractivation _x select 1;</code>
_triggerPresent = triggerActivation _x select 1;
<br>
</sqf>
This is taken directly from the function. Text will generally show up on the left hand side (''inside'' the circle/rectangle) AND on the right hand side (''outside'' the circle/rectangle).
 
This is taken directly from the function.
Text will generally show up on the left hand side (''inside'' the circle/rectangle) AND on the right hand side (''outside'' the circle/rectangle).
Size increments can be changed using ''_this select 1'', another example provided above.
Size increments can be changed using ''_this select 1'', another example provided above.
</dd>
}}
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 17:08, 1 November 2022

Hover & click on the images for description

Description

Description:
Draws a dashed line around the outer edges of a trigger.
Execution:
call
Groups:
Map and Markers

Syntax

Syntax:
[triggers, distance] call BIS_fnc_drawAO
Parameters:
triggers: Object or Array - trigger or list of triggers that indicate AO
distance: Number - (Optional, default 50) number that decides distance between each new line drawn
Return Value:
Nothing

Examples

Example 1:
[Trigger1] call BIS_fnc_drawAO; // draws a dashed line around trigger1's outer edge, with 50m between each line
Example 2:
[Trigger1, 10] call BIS_fnc_drawAO; // draws a dashed line around trigger1's outer edge, with 10m between each line
Example 3:
[[Trigger1, Trigger2]] call BIS_fnc_drawAO; // draws dashed lines around multiple triggers, useful for multiple AOs in one mission

Additional Information

See also:
See also needed

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
Tryteyker- - c
Posted on Sep 28, 2014 - 17:16 (UTC)
It is worth noting that the size, color and other attributes that the line may have are dependant on the trigger itself. The crucial attributes for the function to work properly seem to be the following:
Activation: Anybody OR side player
Size: Has to be bigger than 50x50 to be visible (below 50x50 it will not work properly as the function increments in 50 for each new line)
The following attributes are saved by the function once it is called, all attributes originating from trigger:
private _triggerPos = position _x; _triggerPosX = _triggerPos select 0; _triggerPosY = _triggerPos select 1; _triggerArea = triggerArea _x; _triggerSizeX = _triggerArea select 0; _triggerSizeY = _triggerArea select 1; _triggerSize = _triggerSizeX max _triggerSizeY; _triggerDir = _triggerArea select 2; _triggerType = _triggerArea select 3; _triggerText = triggerText _x; _triggerActivation = triggerActivation _x select 0; _triggerPresent = triggerActivation _x select 1;
This is taken directly from the function. Text will generally show up on the left hand side (inside the circle/rectangle) AND on the right hand side (outside the circle/rectangle). Size increments can be changed using _this select 1, another example provided above.