Jump to content
Nutzgo

(Question) UAV/UGV shows on map

Recommended Posts

There's probably an easy fix, but I don't get it.


I have a mission where the guys are searching for some UAVs and UGVs. The problem is, the UAV/UGVs are showing on map (even with show/hide module). How do I fix it? 
I've checked that when I place them, they have no crew. I also want to have "Show friendlies on map" on. 

Share this post


Link to post
Share on other sites

make a OFOR unit  group it to the BluFor UAV then hide the OFOR unit with <<  this hideobject true >>. 

Then you will not see the BluFor UAV.

Share this post


Link to post
Share on other sites

That didnt work. The UGVs and UAVs can't be grouped.

Share this post


Link to post
Share on other sites

You can enableSimulation false on the UGV/UAVs, then they won't show on map.  You can create a trigger that when player is near UGV/UAV you re-enable simulation to make them usable again.  This assumes you are looking for static UGV/UAV, not an active moving one.

Share this post


Link to post
Share on other sites

Tried that, but it didn't work either. Tried enableSimulation false in their init, also tried disabling simulation in the UAV/UGVs attributes in the editor - still showing on map.

They are static, parked in a garage.
 

Share this post


Link to post
Share on other sites

Ok, so I tried a different approach.

I have now a trigger near the garage, that spawns the UGVs when the players are near:

 

Quote

_vehicleObject = "B_UGV_01_rcws_F" createVehicle (getMarkerPos "ugv1");_vehicleObject setPos getMarkerPos "ugv1";_vehicleObject setDir 205.552;
_vehicleObject = "B_UGV_01_rcws_F" createVehicle (getMarkerPos "ugv2");_vehicleObject setPos getMarkerPos "ugv2";_vehicleObject setDir 205.552;
_vehicleObject = "B_UGV_01_rcws_F" createVehicle (getMarkerPos "ugv3");_vehicleObject setPos getMarkerPos "ugv3";_vehicleObject setDir 205.552;
_vehicleObject = "B_UGV_01_rcws_F" createVehicle (getMarkerPos "ugv4");_vehicleObject setPos getMarkerPos "ugv4";_vehicleObject setDir 205.552;
_vehicleObject = "B_UGV_01_rcws_F" createVehicle (getMarkerPos "ugv5");_vehicleObject setPos getMarkerPos "ugv5";_vehicleObject setDir 205.552;
_vehicleObject = "B_UGV_01_rcws_F" createVehicle (getMarkerPos "ugv6");_vehicleObject setPos getMarkerPos "ugv6";_vehicleObject setDir 205.552;

 

Now this works, because the UGVs do not appear at all on the map before they are spawned in.
My new problem now, is that I cannot connect to them :don8:


I've figured out that I need to use the createVehicleCrew, because I can't use an empty UGV/UAV - but I don't get it, how do I activate this after they've spawned?

Share this post


Link to post
Share on other sites

Update:
I tried to make a script that would give the vehicle a crew.
First trigger spawns the vehicles.
The second trigger executes a script I called "uav.sqf":

 

Quote

_uav = ["B_UGV_01_rcws_F"];

if (typeOf _vehicle in _uav) then
            {
                createVehicleCrew _vehicle;
                    {
                        diag_log [_x, faction _x, side _x, side group _x];
                    }
                forEach crew _vehicle;
            };


Based on this forum post.
But, I only get this error:
 

Quote

'... _uav = ["B_UGV_01_rcws_F"];

if (typeOf _vehicle in _uav) then
            {
                createVehicleCr...'
Error Undefined variable in expression: _vehicle

 

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

×