Jump to content
Sign in to follow this  
DAP

"visibleMap" command and Multiplayer

Recommended Posts

Hi all. I have some problem with my mission. Idea: when map is visible, then controls is visible too, when player close map, then script hide controls too. I try use "visibleMap" command, but it looks like this command work properly only in SP. When I use this command on client only (runs mission on dedicated server), then nothing happens. This command just not works. Can anyone explain how exactly it works? Or, maybe, there is another way?

Share this post


Link to post
Share on other sites

maybe its just a matter of how you deal with locality.

this should work in theory, run from init.sqf or a trigger placed in editor:

if (unitname == player AND visibleMap) then {hint "unitname are showing the map"};

Share this post


Link to post
Share on other sites
maybe its just a matter of how you deal with locality.

this should work in theory, run from init.sqf or a trigger placed in editor:

if (unitname == player AND visibleMap) then {hint "unitname are showing the map"};

Not works. I tried do something like this, but it's not works. I checked locality by hint. Hint works, but condition like "if(visibleMap) then {...};" not.

Share this post


Link to post
Share on other sites

Condition:

if(local player AND visibleMap)then{true}else{false}

On activation:

hint "Map in use!"

...works fine for me.

:rolleyes:

Share this post


Link to post
Share on other sites

You have to do checking in loop (usually while-loop) or using trigger like Buliwyf wrote, but he used too much code, it could be just:

condition

visibleMap

on activation:

hint "map in use"

Share this post


Link to post
Share on other sites

Problem solved. Yes, case was in locality. Condition _unitname==player - not works. Condition local player - works. Thanks you all :)

Share this post


Link to post
Share on other sites

thats because _unitname is a local variable if you used with underscore in front.

anyway, good its solved, these things are irritating when they happen.

Share this post


Link to post
Share on other sites

This makes no sense to me.

Checking "local player" just disables activation on dedicated server.

local player

and

true

(which doesn't change value of conjunction) are equivalents on player's machine

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  

×