Jump to content
Sign in to follow this  
mikie boy

JIP and createmarkers

Recommended Posts

Sorry for this topic - but on searching im struggling to find the answer and its getting frustrating.

When creating a single marker (local or global) via a script it is obviously created - however on leaving and rejoining or simply joining (another player) it is not shown.

Ive tried various methods to get it working - ive used remote execution but that executes the marker again on joining and all that is created when the marker appears- doubling the amount.

latest effort as a last hope is using addPublicVariableEventHandler - but im not over familiar with this other than adding points.

init

if (isServer) then 
{
"objmkr" addPublicVariableEventHandler 
{
	createMarker [((_this select 1) select 0), position ((_this select 1) select 1)];
};
};

script trying to create the marker

_preplacedmkr = [terrorhelper_1, terrorhelper_2] call BIS_fnc_selectRandom;
_markname = "terrorHelpers";
if (isServer) then 
{
hint "1-Location of believed Terrorist supporters updated - Check Map!"; 		
createMarker [_markname, position _preplacedmkr];
"terrorHelpers" setMarkerShape "ELLIPSE";
        "terrorHelpers" setMarkerType "DOT";
        "terrorHelpers" setMarkerSize [75, 75];

} else 

{
hint "2-Location of believed Terrorist supporters updated - Check Map!";
objmkr = [_markname, _preplacedmkr]; publicVariable "objmkr";

"terrorHelpers" setMarkerShape "ELLIPSE";
"terrorHelpers" setMarkerType "DOT";
"terrorHelpers" setMarkerSize [75, 75];
};

ive searched through domination and insurgency maps and im struggling to identify the JIP part.

anyone point me in a better direction - any help would be greatly appreciated - sorry if ive overlooked something that may have been already discussed.

Share this post


Link to post
Share on other sites

MSO or War In Takistan has a JIP Markers feature in it. Uses a dialog and apparently magic to keep them visible to everyone. Might check that out.

Share this post


Link to post
Share on other sites

I have a similar type of question. :cool:

I have a zone control type of mission with 3 zones (zone1 zone2 zone3). This works good on a dedicated server but not a hosted one. On the dedicated server the colors turn green and red, on the hosted one they stay black. The markers are already created in the editor.

init.sqf

"Zone1" addPublicVariableEventHandler {"Zone1" setmarkercolor (_this select 1);};
"Zone2" addPublicVariableEventHandler {"Zone2" setmarkercolor (_this select 1);};
"Zone3" addPublicVariableEventHandler {"Zone3" setmarkercolor (_this select 1);};

WestObj1.sqf

tskWestObj1 setTaskState "SUCCEEDED";
publicVariable "tskWestObj1";

if (side player == west) then {
[objNull, ObjNull, tskWestObj1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
Zone1 = "ColorGREEN";

} else { 

Zone1 = "ColorRED";
};

publicvariable "Zone1";

The idea is if the players side takes the zone it turns green and the other side sees it as red.

Any help would be GREATLY appreciated. :eek:

Share this post


Link to post
Share on other sites

right ive managed to solve it - and without using CBA - but thanks for that Muzzleflash -

in the init - add the rest of the marker properties -

if (isServer) then 
{
"objmkr" addPublicVariableEventHandler 
{
	createMarker [((_this select 1) select 0), position ((_this select 1) select 1)];
               "terrorHelpers" setMarkerShape "ELLIPSE";   //added - 
	"terrorHelpers" setMarkerType "DOT";
	"terrorHelpers" setMarkerSize [75, 75];

};
};


Share this post


Link to post
Share on other sites

sorry forgot to add - in the init - add the following line -

replace "terrorhelpers" with the name of your marker

onPlayerConnected {"terrorHelpers" setMarkerPos (getMarkerPos "terrorHelpers")};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×