Jump to content
Sign in to follow this  
furia

How to make UAV usable in MP maps on dedicated servers????

Recommended Posts

I have created a multiplayer map with an UV that works very nice if I run it on my own computer as host but if I upload it to a dedicated server, even my very own computer as dedicated server, the UAV cannote be managed (does not give the UAV option on the action menu).

The UAV works nice if I run it on my computer even in MP if I do the hosting, but curiosly if I create a dedicated server or I upload the same mision to a dedicated server, then no UAV option.

Is this a known issue? Do I miss something?

I use the same configuration as displayed on the UAV module wiki page

Uav.jpg

Any help would be welcomed since the whole mission turns around the capability of managing the UAV to gather information for one side.

Share this post


Link to post
Share on other sites

It might be an issue of synchronizing only to the local player. You might try scripting the synchronization between the UAV module, UAV, and the player slot you want to control it. Something like this:

if (isServer) then {
UAV_MOD synchronizeObjectsAdd [uAV_TERM, UAV, PLAYER_1]; };

Name each piece on the editor and then replace UAV_MOD with the name of your UAV module, UAV_TERM with the name of the UAV Terminal, and PLAYER_1 should be the name of the player slot you want controlling it.

Share this post


Link to post
Share on other sites

Interesting!!

Should I create an specific script for this or I add this script line to the init line of the player or to the init file?

Share this post


Link to post
Share on other sites

The problem is, when you leave and come back, or somebody joins, it no longer works. What I set up was, a "launch UAV' script as an add action. What it does it launches the UAV with crew and sync's it to everything needed.

I add

this setvariable ["rules",[west]]

to the init of the UAV module

/*  
=========================================================
  Default values of all settings are:
nul = this addAction ["Launch UAV", "uav.sqf",[xvec1,100,BIS_uav_1,"xvec2,xvec1",MQ9PredatorB,west],0,false]

 1: spawn location/vehicle
 2: spawn height
 3: Name of UAV Module - BIS_UAV 
 4: units to be syncronized with Names, xvec2, xvec1,
 5: Version of UAV - MQ9PredatorB
 6: side/group

=========================================================
*/


private ["_vec_array","_myarray"];
_myarray = _this select 3;
_spawloc = _myarray select 0;
_spawhei = if (count _myarray > 1) then {_myarray select 1} else {100};
_uavMod = if (count _myarray > 2) then {_myarray select 2} else {BIS_UAV_1};
_units = if (count _myarray > 3) then {_myarray select 3} else {xvec1, xvec2};
_uavType = if (count _myarray > 4) then {_myarray select 4} else {MQ9PredatorB};
_grp = if (count _myarray > 5) then {_myarray select 5} else {west};

_vclname="MyUAV";

_vec_array = [[getPos _spawloc select 0, getPos _spawloc select 1, (getPos _spawloc select 2) +_spawhei], random 360, _uavType, _grp] call BIS_fnc_spawnVehicle;
_vcl = _vec_array select 0;
_vcl SetVehicleVarName _vclname;
_vcl Call Compile Format ["%1=_vcl;PublicVariable ""%1"";",_vclname];
_initCmd=format["this addMagazine ""4Rnd_Sidewinder_AV8B"";this addWeapon ""SidewinderLaucher""; this disableAI ""AUTOTARGET"" ; this disableAI ""TARGET"" ; this setCombatMode ""BLUE"";this setBehaviour ""careless"";%1 synchronizeObjectsAdd [%2,%3];",_uavmod,_vcl,_units];
_vcl setVehicleInit _initCmd;


processInitCommands;
clearVehicleInit _vcl;


Player sideChat "UAV has been Launched";

Hope it helps.

Share this post


Link to post
Share on other sites

Ya, like Big_Daddy says - that's about how I am doing it too but instead of making an action I assign it to the death event handler for the UAV.

I don't know about adding Sidewinders to the Predator though. I have heard of GBUs and Hellfires but not air to air on those. Maybe I'm out of date...

Share this post


Link to post
Share on other sites

Hi, thanks.

I am using the East UAV and it is unarmed.

My needs are more simple. East starts mission controlling one UAV. If UAV gets destroyed then it is lost.

I will try to adapt your script to this.

THANKS A LOT for your help!!!!!!

Share this post


Link to post
Share on other sites

it's easy to remove the weapons and all. only issue is, if your guys leave and come back, or you have JIP players, then they won't be able to use the UAV, even if it's buzzing around their heads.

I had posted this in another tread

nul = this addAction ["Initialize UAV", "inituav.sqf"]

If you don't have this in the init of the UAV mod:

this setvariable ["rules",[west]]

You'll have to add the player name as well below.

intuav.sqf

BIS_UAV synchronizeObjectsAdd [myterminal1,myuav,player];

change the names above to match your UAV mod, and your terminal/UAV

If you want all East players to have UAV control, change west to east above. Then you won't have to sync the player again. just the UAV.

Share this post


Link to post
Share on other sites

Sry for bumping this up,

i want to use the UAV in a Multiplayer Mission, what can i easyl do to make it sure that the UAV is still avaible after JIP or Death.

Thanks for help!

P.S Is it true that "synchronizeObjectsAdd" only works at the beginning ? I heard that this command only works in the first few minutes of a Mission.

Edited by Clawhammer

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  

×