Need help with map marker

BetterDeadThanZed

Valued Member!
I'm creating PVP zones on my Epoch server. So far, I set up two areas that trigger a message telling players they are entering the PVP zone. I also made markers to show a big red circle on the map in the area where the PVP zone is.

I set one marker up at NWAF using this code:

Code:
_this = createMarker ["", [4685.94, 10209.4, 0]];
_this setMarkerShape "ELLIPSE";
_this setMarkerColor "ColorRed";
_this setMarkerType "Warning";
_this setMarkerBrush "Grid";
_this setMarkerSize [900, 900];

Then, I set up a zone at Green mountain, using this code:

Code:
_this = createMarker ["", [3725.96, 6014.5, 0]];
_this setMarkerShape "ELLIPSE";
_this setMarkerColor "ColorRed";
_this setMarkerType "Warning";
_this setMarkerBrush "Grid";
_this setMarkerSize [500, 500];

The red circle at the NWAF shows up fine on the map. The red circle at Green Mountain doesn't show up. Both sets of code are located in their own .sqf files, which are called from my init.sqf:

Code:
[] execVM "custom\loadout\loadout.sqf";
[] execVM "custom\pvpzone\pvpnwaf.sqf";
[] execVM "custom\pvpzone\pvpgm.sqf";
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
[] execVM "custom\safezone\safezone.sqf";

Any idea why the marker at NWAF works but the one at Green Mountain doesn't?
 
The second one has to be _this1 and then _this2 and so on. It can't be the same.

I got a reply on the Epoch forum and it didn't anything to do with _this, etc... I had to name the markers. I did that and it fixed it.


if you already setup triggers, then why dont you put the markers in the mission.sqm aswell?


The trigger sends a message to the players that they have entered the zone. The markers shows where the PVP zones are on the map.
 
The trigger sends a message to the players that they have entered the zone. The markers shows where the PVP zones are on the map.


reeeheeheeaaaly?

what i meant was if these are permanent markers (wich i assume they are, since you run them via init.sqf instead of activating them via the triggers), then i dont see why you wouldnt just add them in to the mission.sqm file (like when you added the triggers to show the messages) instead of executing a new script for each of the markers?

like this:
Code:
    class Markers
    {
        items=10; // <<--- It is important to change this number to your ammount of markers
        class Item0
        {
            position[]={7839.6055,381.33774,8414.7324};
            name="center";
            type="Empty";
        };
        class Item1
        {
            position[]={-18697.58,379.53012,25815.256};
            name="respawn_west";
            type="Empty";
        };
        class Item2
        {
            position[]={4932.3345,0.39950246,1989.1094};
            name="spawn0";
            type="Empty";
        };
        class Item3
        {
            position[]={2236.0391,0.63119155,1923.3735};
            name="spawn1";
            type="Empty";
        };
        class Item4
        {
            position[]={8738.1328,0.45720705,2122.1082};
            name="spawn2";
            type="Empty";
        };
        class Item5
        {
            position[]={10909.267,0.57597214,2422.3096};
            name="spawn3";
            type="Empty";
        };
        class Item6
        {
            position[]={13510.764,0.44504455,5249.3027};
            name="spawn4";
            type="Empty";
        };
class Item7
{
position[]={2356.2878, 0, 14353.49};
name="Restricted0";
text="Restricted Area";
markerType="ELLIPSE";
type="Empty";
colorName="ColorRedFaded50";
a=350; //same as sensors Radius
b=350; //same as sensors Radius
};
class Item8
{
position[]={3716.55, 0, 5983.84};
name="GreenMountain";
text="Candy Cane";
type="mil_objective";
colorName="ColorOrange";
};
class Item9
{
position[]={8842.2119,0,2281.2202};
name="Box5";
text="Supply Box";
type="waypoint";
colorName="ColorBrown";
};
};

this is just an example and in epoch thers most likely a lot more than 10
 
Every time Epoch is updated, that's just more I have to put back into the mission.sqm. With the markers in a seperate sqf file, I just have to call it from init by adding a couple lines. Now that I think of it, I should see if I can put all of my custom markers into a seperate sqf so I have less work to do when a new version is released.
 
Back
Top