Jump to content
Prado

Radio Trigger on Dedicated

Recommended Posts

I have a issue that my radio trigger command onmapsingleclick exec global,

i want only the team leader to open the map with onsinglemapclick, but it exec on all machines..

Note: if i exec the command on debug console local it work.

==============

Radio Alpha

Condition: this

On act: null = [] execvm "scripts\marker1.sqf";

 

marker1.sqf

===================

deleteMarker "m1";
 
_marker1 = createMarkerLocal ["m1",[0,0,0]];
_marker1 setMarkertype "hd_dot";
_marker1 setMarkerColor "ColorRed";
_marker1 setMarkerText "Alvo 1";
 openMap true;
 onMapSingleClick "openMap false; 'm1' setMarkerPos _pos; onMapSingleClick ''; true;";

Share this post


Link to post
Share on other sites

untested in MP, but if you set your triggers condition to:

this && (player == leader player)

The Alpha 1 radio will still show for everyone, but the code will only execute if the player is a group leader.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you very much, problem solved.. i think i tried (player == sq) but the correct is: this && (player == sq);

Share this post


Link to post
Share on other sites

Try to avoid using player command in conditions on a dedicated server when possible, since player is objNull there.

 

Making the condition:   this && local sq

ought to work fine.  When sq is not played (unit belongs to server), the server won't be calling on the radio trigger.  Trigger would only be called by sq as a player.

  • Like 2

Share this post


Link to post
Share on other sites

Problem will remain with multiple team leaders (in MP). You'll need to create one trigger per TL... or write a unique scripted local trigger with:

  createTrigger [type, position, makeGlobal: FALSE]

 

  • Like 1

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

×