Jump to content
Sign in to follow this  
alleycat

Placed UGV with createvehicle, why does it have to be hacked?

Recommended Posts

Placed an UGV as a blufor UAV operator with a script, but it still has to be "hacked" to be accessible. Why, the unit and drone are already blufor.

_veh = createVehicle ["B_UGV_01_rcws_F", getpos _caller, [], 5, "NONE"];

Share this post


Link to post
Share on other sites

The 'Hack UAV' action is just a way of saying  'spawn friendly AI crew inside this vehicle'

 

createVehicle doesnt create the crew.

 

 

something like this would spawn the crew as well:

 

createVehicleCrew (createVehicle ["B_UGV_01_rcws_F", getpos _caller, [], 5, "NONE"]);

Share this post


Link to post
Share on other sites

I would like to add a new question:

_vehicle = createVehicleCrew (createVehicle ["I_UAV_02_CAS_F",_pos, [], 1, "NONE"]);_vehicle flyinheight 300;

Produces error about _vehicle being unknown.

Share this post


Link to post
Share on other sites

I would like to add a new question:

_vehicle = createVehicleCrew (createVehicle ["I_UAV_02_CAS_F",_pos, [], 1, "NONE"]);_vehicle flyinheight 300;

Produces error about _vehicle being unknown.

 

That's because createVehicleCrew doesn't return anything; create your drone before using createVehicleCrew, so you can refer to it since createVehicle will return the created object.

Share this post


Link to post
Share on other sites

I would like to add a new question:

_vehicle = createVehicleCrew (createVehicle ["I_UAV_02_CAS_F",_pos, [], 1, "NONE"]);_vehicle flyinheight 300;

Produces error about _vehicle being unknown.

 

in this case, some format like this is more appropriate, when you want to store the object in a variable (_vehicle) for future reference.

 

_vehicle = createVehicle ["I_UAV_02_CAS_F",_pos,[],1,"NONE"];

createVehicleCrew _vehicle;

_vehicle flyInHeight 300;

Share this post


Link to post
Share on other sites

Thanks, I should be more attentive to return vaues.

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  

×