OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Binary on 20 Aug 2009, 19:07:44

Title: Hiding UPS marker for JIP players
Post by: Binary on 20 Aug 2009, 19:07:44
Hello folks

I'm using Kronzky's wonderfull Urban Patrol Script (UPS) to have areas patrolled.

In order to hide the markers, I have the following in my init.sqf:
Code: [Select]
if(isServer) then {
    "marker1" setMarkerPos [-(getMarkerPos "marker1" select 0),-(getMarkerPos "marker1" select 1)];
};

This works great - except yesterday when we had a JIP player that said that he could see all the markers :(

Is there a smart/efficient way to excecute this code on JIP players as well??
Title: Re: Hiding UPS marker for JIP players
Post by: Inkompetent on 21 Aug 2009, 14:36:31
First thing I'd try with is putting your command in the init.sqf without the isServer check (although the design of UPS might cause this to have no effect).

If the above doesn't work, have you tried to use onPlayerConnected (http://community.bistudio.com/wiki/onPlayerConnected) to force the server to re-broadcast the UPS settings to all clients?

I haven't really understood how the new multiplayer framework (http://community.bistudio.com/wiki/onPlayerConnected) works, but it seems to me like it should be possible to broadcast a variable to a specific client only, which you should be able to get through onPlayerConnected.

Haven't used neither of the above before, but seems like it could work.
Title: Re: Hiding UPS marker for JIP players
Post by: mikey on 21 Aug 2009, 16:02:43
That sounds all complicated.

Why dont you just do something like this in your init.sqf:

Code: [Select]
"marker1" setMarkerAlphaLocal 0;
This just makes the marker 100% transparent for everyone, even for the server and I don't think UPS cares about that, only humans  :)
Title: Re: Hiding UPS marker for JIP players
Post by: Case on 21 Aug 2009, 16:30:56
Our group uses mikey's solution for our missions and it works fine.
Title: Re: Hiding UPS marker for JIP players
Post by: Shuko on 21 Aug 2009, 17:14:26
Placing that into an init field of a game logic or any unit will hide it even sooner.
Title: Re: Hiding UPS marker for JIP players
Post by: Binary on 22 Aug 2009, 15:21:19
Thank you for your answers :)

Mikey - your solution seems absolutely genial.
Just tested it - and you're right, UPS doesn't care about transparency ;)