DAP 619 Posted June 30, 2011 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
demonized 20 Posted June 30, 2011 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
DAP 619 Posted June 30, 2011 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
buliwyf 4 Posted June 30, 2011 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
Przemek_kondor 14 Posted June 30, 2011 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
DAP 619 Posted June 30, 2011 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
demonized 20 Posted June 30, 2011 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
Przemek_kondor 14 Posted June 30, 2011 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