Jump to content
Sign in to follow this  
bangabob

Created Markers for JIP players

Recommended Posts

Here it goes again. The dreaded JIP markers.

createMarker.sqf (server side)

null = ["mkr1"] execVM "createMarker.sqf";

if (!isServer) exitwith {};
private ["_baseName","_basePos"];

_baseName = (_this select 0);
_basePos = getpos (_this select 0);

_baseID = format["um%1",_baseName];
	_baseMarker = createMarker [_baseID, _basePos];
	_baseMarker setMarkerType "hd_flag";
	_baseMarker setMarkerColor "ColorBlue";

So my question is. How can i get these variables into the init.sqf to allow me to create a local marker for each player that joins.

_baseName

_basePos

Share this post


Link to post
Share on other sites
Here it goes again. The dreaded JIP markers.

Not anymore, the engine now synchronizes global markers automatically for all players, including those who JIP. ;)

Share this post


Link to post
Share on other sites
Not anymore, the engine now synchronizes global markers automatically for all players, including those who JIP. ;)

But.... it doesn't for a marker created via script.lol. Is this in the non-development build?

I've been messing about with it for the last 2 days on my dedicated server and if it worked then i wouldnt be asking the question ;)

Share this post


Link to post
Share on other sites

by using the new bis_fnc_MP :)

put your code into a function and call it with bis_fnc_MP and it should work.+


JIPmark = {

private ["_baseName","_basePos"];

_baseName = (_this select 0);
_basePos = getpos (_this select 0);

_baseID = format["um%1",_baseName];
	_baseMarker = createMarker [_baseID, _basePos];
	_baseMarker setMarkerType "hd_flag";
	_baseMarker setMarkerColor "ColorBlue";


};

call with

[[ARGUMENTS],"JIPmark ", true, true] spawn BIS_fnc_MP.

this should work.

Share this post


Link to post
Share on other sites

Thanks that appear to half work. I have

JIPmarker.sqf

if (!isServer) exitwith {};
hint "called";
[[FOB_ONE],"JIPmark", true, true] spawn BIS_fnc_MP;
[[FOB_TWO],"JIPmark", true, true] spawn BIS_fnc_MP;
[[FOB_THREE],"JIPmark", true, true] spawn BIS_fnc_MP;

init.sqf

[] execVM "jipmarker.sqf";

JIPmark = {

private ["_baseName","_basePos"];

_baseName = (_this select 0);
_basePos = getpos (_this select 0);

	_baseID = format["um%1",_baseName];
	_baseMarker = createMarkerLocal [_baseID, _basePos];
	_baseMarker setMarkerTypeLocal "hd_flag";
	_baseMarker setMarkerColorLocal "ColorBlue";
};

Markers show when a player re-connects. But when launching from the lobby they aren't shown.

I suppose i have to create the markers twice?

If theres a way to make this run from the start then it would be perfect.

(Im a bit of a perfectionist, cant stand extra things that arent needed.lol)

Share this post


Link to post
Share on other sites

mh, i see.

I'd just create the marker and then run the function.

Maybe you could implement some IsNil checks since the function/code will be executed on every machine.

Share this post


Link to post
Share on other sites

Hi BangaBob,

I'm not sure, but I think your fob_one need double quotes like

[["FOB_ONE"],"JIPmark", true, true] spawn BIS_fnc_MP;

since it's a marker? And also, I may have not understood all the logic, but how can you getPos a marker you are about to create?

cordially,

Share this post


Link to post
Share on other sites

FOB_ONE is presumably an object on the map, so therefore no quotes and getPos would work on it. It ends up being "umFOB_ONE" as the final name.

Also shouldn't JIPMark be declared above the call to it in init.sqf so the game knows what function it actually is?

Share this post


Link to post
Share on other sites

no quote marks, as it is a gamelogic. also yes i realise that the function must initiate before the function is called. my above scripts work fine for me :)

Share this post


Link to post
Share on other sites
no quote marks, as it is a gamelogic. also yes i realise that the function must initiate before the function is called. my above scripts work fine for me :)

oh, ok, is there an advantage of using a gamelogic, apart not having to pass positions, or is it for testing purpose.

as I see it now you are putting a gamelogic per marker, why not putting the marker instead. was that the point of script created markers not working in JIP?

I'm learning with you guys, so it is not intended to be rude or whatever, just trying to understand and learn with you.

Share this post


Link to post
Share on other sites
oh, ok, is there an advantage of using a gamelogic, apart not having to pass positions, or is it for testing purpose.

as I see it now you are putting a gamelogic per marker, why not putting the marker instead. was that the point of script created markers not working in JIP?

I'm learning with you guys, so it is not intended to be rude or whatever, just trying to understand and learn with you.

i need gamelogics for my respawn script. And it is harder to spawn gamelogics through scripts than markers so i thought its simpler to spawn a marker on the gamelogic

Share this post


Link to post
Share on other sites

There isn't a point to markers not working in JIP, that's a bug we've been hoping would be fixed forever. :) Sounds like it might be!

Gamelogic vs Marker is kinda up to you really. Gamelogics are more versatile where you can give it waypoints or have an init field or use it as an object.

One good trick with markers is as a random spawn location for objects. Say you have a roadside bomb. Place it where you might want it and place markers at other locations you might want it to be at. Then group the markers to the object. At game start it'll be either where you placed it or at one of the other markers.

Share this post


Link to post
Share on other sites
Not anymore, the engine now synchronizes global markers automatically for all players, including those who JIP. ;)

what version of arma3 do markers work on JIP now? the stable beta don't work for me on dedicated

Share this post


Link to post
Share on other sites
what version of arma3 do markers work on JIP now? the stable beta don't work for me on dedicated

Moricky - can you confirm for us that JIP markers do now work in a dedicated server environment? I've only been able to test with self-hosted servers lately.

Share this post


Link to post
Share on other sites
Just run a quick test on Dedi and they did not work for me :( ill stick to CBA until they fix it !

I can confirm that this is the case; I, too, just ran a test on a dedicated server. Mission created 3 or 4 markers across the map via script (post-init) > JIP player joined the game > JIP player couldn't see any of the markers.

Damn! Really wanted this to work. :( I'm assuming this is supposed to work on dedicated servers too, Moricky? Any chance of a fix soon or should I look to other methods?

Share this post


Link to post
Share on other sites

http://forums.bistudio.com/showthread.php?123821-JIP-and-createmarkers & http://forums.bistudio.com/showthread.php?130648-Move-Marker&highlight=jip+markers

http://forums.bistudio.com/showthread.php?145156-Marker-problem-on-dedicated-server&highlight=jip+markers

ensure you have in the init.sqf - onplayerConnected {execVM "setingamemarkers.sqf"};

setingamemarkers.sqf

"terrorHelpers" setMarkerPos (getMarkerPos "terrorHelpers");

has never let me down :)

Share this post


Link to post
Share on other sites

ensure you have in the init.sqf - onplayerConnected {execVM "setingamemarkers.sqf"};

setingamemarkers.sqf

"terrorHelpers" setMarkerPos (getMarkerPos "terrorHelpers");

has never let me down :)

Forgive me if I've got this wrong - it's late over here - but surely that works only for pre-defined markers?

What I mean is, if I have markers which have dynamic names (I don't know what the names of the markers will be), I couldn't use this system?

Damn this trickiness! :D

Share this post


Link to post
Share on other sites

you can have an array of marker names and add your dynamic marker names to it e.g

just make a global array name

friendlymarkers = ["friendly_1","friendly_2","friendly_3","friendly_4","friendly_5","friendly_6","friendly_7","friendly_8","friendly_9","friendly_10","friendly_11","friendly_12","friendly_13","friendly_14","friendly_15","friendly_16"];

{
_x setMarkercolor (getMarkercolor _x);
}foreach friendlymarkers;

Share this post


Link to post
Share on other sites

From my testing, it appears that markers created by scripts local to the server post-init only show up for JIP players if the server is a 'hosted' or 'listen' server. Players joining a dedicated server still cannot see the markers :(

Share this post


Link to post
Share on other sites
you can have an array of marker names and add your dynamic marker names to it e.g

just make a global array name

friendlymarkers = ["friendly_1","friendly_2","friendly_3","friendly_4","friendly_5","friendly_6","friendly_7","friendly_8","friendly_9","friendly_10","friendly_11","friendly_12","friendly_13","friendly_14","friendly_15","friendly_16"];

{
_x setMarkercolor (getMarkercolor _x);
}foreach friendlymarkers;

So then to I take it it's just the same to set their positions for JIP?

onplayerConnected {execVM "setingamemarkers.sqf"};

setingamemarkers.sqf:

friendlymarkers = ["friendly_1","friendly_2","friendly_3","friendly_4","friendly_5","friendly_6","friendly_7","friendly_8","friendly_9","friendly_10","friendly_11","friendly_12","friendly_13","friendly_14","friendly_15","friendly_16"];

{
_x setMarkerPos (getMarkerPos  _x);
}foreach friendlymarkers;

right? and if any markers don't yet exist in the mission they will just be ignored?

Share this post


Link to post
Share on other sites

Just tested on a dedi server. As a player I put down a marker on the map. Then I disconnected to the server select screen. Came back into the server as a different slot. I could see the marker I put down.

So maybe player markers are persistent but scripted ones aren't?

Share this post


Link to post
Share on other sites
Just tested on a dedi server. As a player I put down a marker on the map. Then I disconnected to the server select screen. Came back into the server as a different slot. I could see the marker I put down.

So maybe player markers are persistent but scripted ones aren't?

Player markers are persistent on Arma 2 though as well aren't they so that isn't anything new. Moricky said he was talking about scripted ones. Maybe this is on the devbuild only, or maybe it's only something that's been tried and not even implemented yet, or maybe it's just been completely made up? haha

Share this post


Link to post
Share on other sites

I wish Moricky would simplify stuff for mission makers. not only JIP markers but he can add team markers preconfiged.

And all we would need to do is.

configed via Description.ext

Team_Markers = 1; //shows team markers. true or false

//config settings

Team_Marker_Color = "ColorBLUFOR";

Team_Marker_Type = "mil_dot"

Team_Marker_Size [0.8, 0.8];

etc....

Share this post


Link to post
Share on other sites

Probably more likely a Module. :) Should be simple enough to add actually.

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  

×