Difference between revisions of "DCS func circleToAll"

From DCS World Wiki - Hoggitworld.com
 
(One intermediate revision by the same user not shown)
Line 84: Line 84:
 
|optType3=
 
|optType3=
  
|examples=  
+
|examples= The following will take a trigger zone placed in the editor and use the center point and the radius of that zone to draw a circle that is shaded in red with no outline.
 +
 
 +
  local ref = trigger.misc.getZone("targetArea")
 +
  trigger.action.circleToAll(-1 , 1, ref.point , ref.radius , {0, 0, 0, 0} , {1, 0, 0, .7} , 0 , true)
 
|related=  
 
|related=  
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}
|notes= In 2.5.6 THIS WILL CRASH CLIENTS WHO OPEN THE MAP VIEW.
+
|notes= In Single Player without an aircraft selected you can see objects assigned to display for coalitionId 0. In multiplayer only shapes assigned to id -1 and your coalition will be visible.  
 
 
*Should be fixed in 2.7 though.
 
In Single Player without an aircraft selected you can see objects assigned to display for coalitionId 0. In multiplayer only shapes assigned to id -1 and your coalition will be visible.  
 
 
}}
 
}}
 
[[Category:Singleton Functions|circleToAll]]
 
[[Category:Singleton Functions|circleToAll]]
 
[[Category:Game Patch 2.5.5|circleToAll]]
 
[[Category:Game Patch 2.5.5|circleToAll]]

Latest revision as of 20:43, 10 August 2023

Scripting Root

Envrioment: Mission Scripting
Function: circleToAll Added with: 2.5.5
Member Of: trigger.action
Syntax: function trigger.action.circleToAll(number coalition , number id , vec3 center , number radius , table color , table fillColor , number lineType , boolean readOnly, string message)
Description: Creates a circle on the map with a given radius, color, fill color, and outline.

Coalition Ids to be used.

 -1 All
  0 Neutral
  1 Red
  2 Blue

Id MUST be unique and is shared with the ids used with mark panels. Likewise trigger.action.removeMark is used to remove shapes created.

center MUST be a vec3 table. {x, y z}

radius is the radius of the circle in meters.

Color format is {r, g, b, a} with values 0 to 1. A red line with 50% alpha would be {1, 0, 0, 0.5}

Color is the color used for the outline around the shape.

Colorfill corresponds to the shading of the shape

LineType corresponds to an enumerator value. LineTypes:

0  No Line
1  Solid
2  Dashed
3  Dotted
4  Dot Dash
5  Long Dash
6  Two Dash

readOnly denotes whether in the future if clients will be allowed to edit or remove the shape.

Message corresponds to an message box that will appear when the shape is added.


Return Value: function
Return Example: none
Examples: The following will take a trigger zone placed in the editor and use the center point and the radius of that zone to draw a circle that is shaded in red with no outline.
 local ref = trigger.misc.getZone("targetArea")
 trigger.action.circleToAll(-1 , 1, ref.point , ref.radius , {0, 0, 0, 0} , {1, 0, 0, .7} , 0 , true)
Related Functions: Trigger Functions: ctfColorTag, getUserFlag, setUserFlag, getZone, explosion, smoke, effectSmokeBig, effectSmokeStop, illuminationBomb, signalFlare, radioTransmission, stopRadioTransmission, setUnitInternalCargo

outSound, outSoundForCoalition, outSoundForCountry, outSoundForGroup, outSoundForUnit, outText, outTextForCoalition, outTextForCountry, outTextForGroup, outTextForUnit

addOtherCommand, removeOtherCommand, addOtherCommandForCoalition, removeOtherCommandForCoalition, addOtherCommandForGroup, removeOtherCommandForGroup

markToAll, markToCoalition, markToGroup, removeMark, markupToAll, lineToAll, circleToAll, rectToAll, quadToAll, textToAll, arrowToAll, setMarkupRadius, setMarkupText, setMarkupFontSize, setMarkupColor, setMarkupColorFill, setMarkupTypeLine, setMarkupPositionEnd, setMarkupPositionStart

setAITask, pushAITask, activateGroup, deactivateGroup, setGroupAIOn, setGroupAIOff, groupStopMoving, groupContinueMoving

Notes: In Single Player without an aircraft selected you can see objects assigned to display for coalitionId 0. In multiplayer only shapes assigned to id -1 and your coalition will be visible.