2024-01-11 20:01:50 +00:00
|
|
|
#include "..\script_component.hpp"
|
2024-01-08 21:22:52 +00:00
|
|
|
/*
|
|
|
|
* Author: Lambda.Tiger
|
2024-01-18 00:20:47 +00:00
|
|
|
* Add a colored sphere at a specified point.
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2024-01-18 02:52:25 +00:00
|
|
|
* 0: ASL position to add sphere. <ARRAY>
|
|
|
|
* 1: Color of sphere. <STRING> (Default: Blue)
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2024-02-14 22:50:09 +00:00
|
|
|
* [getPosASL player, "blue"] call ace_frag_fnc_dev_sphereDraw;
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2024-01-18 02:52:25 +00:00
|
|
|
|
2024-01-08 21:22:52 +00:00
|
|
|
params [
|
2024-01-18 02:52:25 +00:00
|
|
|
"_posASL",
|
|
|
|
["_color", "blue", [""]]
|
2024-01-08 21:22:52 +00:00
|
|
|
];
|
|
|
|
|
2024-01-15 19:13:59 +00:00
|
|
|
if (_color select [0,1] != "(") then {
|
2024-01-16 00:44:15 +00:00
|
|
|
_color = switch (toLowerANSI _color) do {
|
|
|
|
case "blue": {"(0,0,0.8,0.5)"};
|
|
|
|
case "black": {"(1,1,1,0.5)"};
|
|
|
|
case "white": {"(0,0,0,0.5)"};
|
|
|
|
case "red": {"(0.8,0,0,0.5)"};
|
|
|
|
case "green": {"(0,0.8,0,0.5)"};
|
|
|
|
case "yellow": {"(0.8,0.8,0,0.5)"};
|
|
|
|
case "orange": {"(0.8,0.518,0,0.5)"};
|
|
|
|
default {"(0.8,0.8,0,0.5)"};
|
2024-01-08 21:22:52 +00:00
|
|
|
};
|
|
|
|
};
|
2024-01-15 19:13:59 +00:00
|
|
|
private _colorString = "#(argb,8,8,3)color" + _color;
|
2024-01-08 21:22:52 +00:00
|
|
|
|
2024-01-15 22:10:01 +00:00
|
|
|
private _sphere = createVehicle ["Sign_Sphere25cm_F", ASLtoATL _posASL, [], 0, "CAN_COLLIDE"];
|
2024-01-15 19:13:59 +00:00
|
|
|
_sphere setObjectTextureGlobal [0, _colorString];
|
2024-01-08 21:22:52 +00:00
|
|
|
GVAR(dev_eventSpheres) pushBack _sphere;
|