Jump to content
Sign in to follow this  
McArcher

Marker Color Global?

Recommended Posts

I have another noob question :)

If marker is created via Editor is it global (if any client moves it, will it be moved on other clients too?) ?

If one client changes its color, will it be changed on all clients?

If not, how can I make marker, made in Editor, changing color for all clients? Changing it by server's script ? Please, examples will be very useful.

I've searched, but hasnt found it.

---------- Post added at 19:34 ---------- Previous post was at 19:22 ----------

http://community.bistudio.com/wiki/Locality_in_Multiplayer - no word about markers...

---------- Post added at 19:38 ---------- Previous post was at 19:34 ----------

http://community.bistudio.com/wiki/setMarkerColor - here's no picture if it is local or global...

Share this post


Link to post
Share on other sites

All markers are local, they seem "global" because they have same name on every machine.

[/color]http://community.bistudio.com/wiki/setMarkerColor - here's no picture if it is local or global...

Well, setMarkerColor vs setMarkerColorLocal, should be pretty self-explanatory. Pretty much all the marker commands have a local version. Local affects the marker only on the machine it is executed on, the normal/global command affects marker with the given name on all machines.

Share this post


Link to post
Share on other sites

server's script runs setMarkerColor but on clients marker is with old color... why could that be?

Share this post


Link to post
Share on other sites

I seem to recall reading somewhere that setMarkerColor is local. Maybe BIS forgot about it and made another setMarkerColorLocal function, lol. I just use the spawning magic cone init to set the color on all clients.

Share this post


Link to post
Share on other sites

I have a script running on the server that uses setMarkerType, Color and Pos, that correctly change on clients - but they were created using createMarker on the server, perhaps it doesn't work properly for markers placed in the editor?

Share this post


Link to post
Share on other sites

That's interesting to know. And it certainly would simplify marker handling. Rather odd though if what you create in the editor is local and what you create on the server is global: for everything else its usually the opposite.

Share this post


Link to post
Share on other sites
That's interesting to know. And it certainly would simplify marker handling. Rather odd though if what you create in the editor is local and what you create on the server is global: for everything else its usually the opposite.

Yeh, what surprised me is they showed up on JIP clients as well.

Share this post


Link to post
Share on other sites

Actually, setmarkercolor run on server will change color of createmarker and editor placed marker colors on clients. Just use them correctly.

As I said, all markers are local. Markers are not objects that are synched. The "global" commands just mean that the "local" version of the same command is run on each machine instead of only on the one executing it. That's beauty of editing markers; you can create them globally and then change them locally to just part of the players etc without needing to worry about passing IDs or objects, all you need to remember is the name in string format.

Rather odd though if what you create in the editor is local and what you create on the server is global: for everything else its usually the opposite.

Well, apart from objects placed in editor, rest are local (markers, triggers etc). Most of that stuff just seem global, because each client has the mission file from which to load those things.

Share this post


Link to post
Share on other sites

thanks, I'll try adding those markers by a script. I hope, it'll help :)

Share this post


Link to post
Share on other sites

created all markers by server's script and now it works. thanks again :)

Share this post


Link to post
Share on other sites

markers are invisible for JIP! even if created with server's script! What for BIS made 2 different marker-creating-functions?.... I'll have now to write syncronizing script :(

Share this post


Link to post
Share on other sites

- Markers are not synched for JIPs.

- Marker is created for each machine (server + clients) with createmarker.

- Marker is created only for the machine executing createmarkerlocal.

Share this post


Link to post
Share on other sites

well, I have rewritten scripts, now I resync them after JIP. thanks to everybody.

Edited by McArcher

Share this post


Link to post
Share on other sites

how can i check that marker already exists?

---------- Post added at 21:22 ---------- Previous post was at 21:16 ----------

not (isnil "my_marker_x") ?

Edited by McArcher

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  

×