Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added visible staging zones for non-vehicle zones #1060

Merged
merged 2 commits into from
Nov 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions cScripts/functions/mission/fn_addStagingZone.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,25 @@ params [
["_size", 12, [0]]
];

private _stagingZones = missionNamespace getVariable [QEGVAR(Staging,Zones), []];
private _stagingZones = GETMVAR(EGVAR(Staging,Zones), []);

// Check if zone is marker
if (_zone isEqualType "") then {
private _markerPos = getMarkerPos _zone;
_zone = "UserTexture1m_F" createVehicle _markerPos;
};

_stagingZones pushBack [_zone, _size];

missionNamespace setVariable [QEGVAR(Staging,Zones), _stagingZones];
SETMVAR(EGVAR(Staging,Zones), _stagingZones)

#ifdef DEBUG_MODE
private _debugMarker = createMarkerLocal [format["DebugStadgeingMarker_%1", count _stagingZones], _zone];
_debugMarker setMarkerShapeLocal "ELLIPSE";
_debugMarker setMarkerSizeLocal [_size, _size];
_debugMarker setMarkerColorLocal "colorCivilian";
INFO_1("Staging", "Staging zone %1 created.", count _stagingZones);
#endif
INFO_2("Staging", "Staging zone %1 (%2) created.", count _stagingZones, _zone);

// Vehicles dont paint out the zone
if (_zone isKindOf "AllVehicles") exitWith {};
INFO_2("Staging", "Revlealing staging zone %1 (%2)", count _stagingZones, _zone);

private _visibleZone = createMarkerLocal [format["VisibleStadgeingMarker_%1", count _stagingZones], _zone];
_visibleZone setMarkerShapeLocal "ELLIPSE";
_visibleZone setMarkerSizeLocal [_size, _size];
_visibleZone setMarkerColorLocal "ColorYellow";