Nicholas Lendall 9 Posted May 20, 2019 Hey guys im trying make it so when i capture a sector it puts my flag up on the map and stays there even if i decide to leave. Then when the enemy moves into the town the flag changes to the enemy flag and hides mine. When i come back and take the town it hides the enemy's flag and my shows up again. My map starts out with 10 control points with the Slovenian flags showing i want to be able to move there and after a 100s the flag is changed to the US flag and stays there until the enemy moves back into the town and same for the enemy flag. Im using the Sector Control module to show if the town in cleared /captured. i used the setMarkerAlpha code to a trigger and did 2 triggers "UnitedStates_3" setMarkerAlpha 0; "SOL_3" setMarkerAlpha 1; and the other "UnitedStates_3" setMarkerAlpha 1; "SOL_3" setMarkerAlpha 0; but only the US flag changed and stayed forever. Its pretty much capture the area and show your flag until the enemy enters for X amount of time and there flag shows up and gives you a reason to go back and recapture with your flag. Share this post Link to post Share on other sites
Larrow 2822 Posted May 21, 2019 Use the scripted event ownerChanged. Spoiler //initServer.sqf //For all sectors in the mission { //Create a Slovenia maker at the sectors position _mrk = createMarker [ format[ "sector_%1_flag", _x call BIS_fnc_objectVar ], getPosATL _x ]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "flag_Slovenia"; //Save a reference to the marker on the sector _x setVariable[ "flagMarker", _mrk ]; //Add event for when sectors owner changes [ _x, "ownerChanged", { params[ "_sector", "_owner" ]; //Get the marker reference from the sector _mrk = _sector getVariable "flagMarker"; //Update markers icon dependant on sectors new owner //This line depends on Slovenia being OPFOR and USA being BLUFOR _mrk setMarkerType ( [ "flag_Slovenia", "flag_USA" ] select ( _owner call BIS_fnc_sideID )); }] call BIS_fnc_addScriptedEventHandler; }forEach BIS_fnc_moduleSector_sectors; TEST_MISSION 1 Share this post Link to post Share on other sites
Nicholas Lendall 9 Posted May 24, 2019 thanks bro! ill check it out!! Share this post Link to post Share on other sites
Nicholas Lendall 9 Posted May 24, 2019 DUDE!!! Thank you so much this is perfect! do you know anything about making a tower spawn reinforcements if not destroyed within "X" about of time? Share this post Link to post Share on other sites
Nicholas Lendall 9 Posted May 25, 2019 For some reason it will not update on my server and change flags is there anyway to check whats going on? Share this post Link to post Share on other sites