Jump to content
Twiznak

Script not working on a dedicated server

Recommended Posts

Hi, I put together a script that allows players to choose where the mission AO is going to be.

Mark.sqf

Spoiler

openMap true;

Hint "Click once on the map where you want the Area of Operation to be.";

mapclick = false;

onMapSingleClick "
_marker_0= createMarker ['marker_0',[0,0,0]];
_marker_0 setMarkerShape 'ELLIPSE';
_marker_0 setMarkerSize ['AOsize' call BIS_fnc_getParamValue, 'AOsize' call BIS_fnc_getParamValue];
'marker_0' setMarkerPos _pos;
mapclick = true;
null=[
    ['marker_0'],
    ['HGunits' call BIS_fnc_getParamValue,'HGsize' call BIS_fnc_getParamValue,'HGprob' call BIS_fnc_getParamValue],
    ['PGunits' call BIS_fnc_getParamValue,'PGsize' call BIS_fnc_getParamValue,'PGprob' call BIS_fnc_getParamValue],
    ['APCunits' call BIS_fnc_getParamValue,'APCsize' call BIS_fnc_getParamValue,'APCprob' call BIS_fnc_getParamValue],
    ['Tankunits' call BIS_fnc_getParamValue,'Tankprob' call BIS_fnc_getParamValue],
    ['SWunits' call BIS_fnc_getParamValue,'SWprob' call BIS_fnc_getParamValue],
    ['ACHunits' call BIS_fnc_getParamValue,0,'ACHprob' call BIS_fnc_getParamValue],
    ['Opforfaction' call BIS_fnc_getParamValue,0,'ZoneAct' call BIS_fnc_getParamValue,EAST,FALSE]
    ] call EOS_Spawn;
openMap false;
deleteVehicle omni_1;
true";

waitUntil{!visibleMap};


onMapSingleClick "";

Works great on local hosted multiplayer, but when it is run on a dedicated server it doesn't connect with EOS and no enemies spawn. I have been through this "not working on a dedicated server" a lot lately and i think "call EOS_Spawn" has something to do with it. remoteExecCall is what I am thinking but I don't know how to do. I am totally green on dedicated server script syntax and functionality. I need help. If anyone who has the knowledge and has the time to help I would really appreciate an explanation and a rewrite on the script to get it functional on a dedicated server.   

Share this post


Link to post
Share on other sites

From where do you run this script?

The onMapSingleClick  is supposed to run for PC with interface (player)

Share this post


Link to post
Share on other sites
openMap true;

Hint "Click once on the map where you want the Area of Operation to be.";

mapclick = false;

onMapSingleClick "

_marker_0 = createMarker [format ['%1',_pos],_pos];
_marker_0 setMarkerShape 'ELLIPSE';
_marker_0 setMarkerSize ['AOsize' call BIS_fnc_getParamValue, 'AOsize' call BIS_fnc_getParamValue];

mapclick = true;
0 = [
[_marker_0],
    ['HGunits' call BIS_fnc_getParamValue,'HGsize' call BIS_fnc_getParamValue,'HGprob' call BIS_fnc_getParamValue],
    ['PGunits' call BIS_fnc_getParamValue,'PGsize' call BIS_fnc_getParamValue,'PGprob' call BIS_fnc_getParamValue],
    ['APCunits' call BIS_fnc_getParamValue,'APCsize' call BIS_fnc_getParamValue,'APCprob' call BIS_fnc_getParamValue],
    ['Tankunits' call BIS_fnc_getParamValue,'Tankprob' call BIS_fnc_getParamValue],
    ['SWunits' call BIS_fnc_getParamValue,'SWprob' call BIS_fnc_getParamValue],
    ['ACHunits' call BIS_fnc_getParamValue,0,'ACHprob' call BIS_fnc_getParamValue],
    ['Opforfaction' call BIS_fnc_getParamValue,0,'ZoneAct' call BIS_fnc_getParamValue,EAST,FALSE]
    ] remoteExec ['EOS_Spawn',2,false];
openMap false;
deleteVehicle omni_1;
true
";

waitUntil{!visibleMap};


onMapSingleClick "";

 

  • Like 1

Share this post


Link to post
Share on other sites
56 minutes ago, davidoss said:

openMap true;

Hint "Click once on the map where you want the Area of Operation to be.";

mapclick = false;

onMapSingleClick "

_marker_0 = createMarker [format ['%1',_pos],_pos];
_marker_0 setMarkerShape 'ELLIPSE';
_marker_0 setMarkerSize ['AOsize' call BIS_fnc_getParamValue, 'AOsize' call BIS_fnc_getParamValue];

mapclick = true;
0 = [
[_marker_0],
    ['HGunits' call BIS_fnc_getParamValue,'HGsize' call BIS_fnc_getParamValue,'HGprob' call BIS_fnc_getParamValue],
    ['PGunits' call BIS_fnc_getParamValue,'PGsize' call BIS_fnc_getParamValue,'PGprob' call BIS_fnc_getParamValue],
    ['APCunits' call BIS_fnc_getParamValue,'APCsize' call BIS_fnc_getParamValue,'APCprob' call BIS_fnc_getParamValue],
    ['Tankunits' call BIS_fnc_getParamValue,'Tankprob' call BIS_fnc_getParamValue],
    ['SWunits' call BIS_fnc_getParamValue,'SWprob' call BIS_fnc_getParamValue],
    ['ACHunits' call BIS_fnc_getParamValue,0,'ACHprob' call BIS_fnc_getParamValue],
    ['Opforfaction' call BIS_fnc_getParamValue,0,'ZoneAct' call BIS_fnc_getParamValue,EAST,FALSE]
    ] remoteExec ['EOS_Spawn',2,false];
openMap false;
deleteVehicle omni_1;
true
";

waitUntil{!visibleMap};


onMapSingleClick "";

 

  YES :drinking2:Davidoss for the win! Again! I am humbled by your benevolence.

 

 remoteExec & remoteExecCall 

  

Edited by B_Armaholic_Z_F
Of course i checked to see if it worked before I responded.

Share this post


Link to post
Share on other sites

 

Instead of humbling yourself, wonder what happened and check if whether it will work at all.

As Pierr wrote, it may not compile correctly

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

×