Closed ruisu07 closed 4 years ago
I am not sure I understand the question. There is an example with a list of arguments in the function itself: https://github.com/IDI-Systems/acre2/blob/master/addons/api/fnc_addRackToVehicle.sqf
[cursorTarget, ["ACRE_VRC103", "Upper Dash", "Dash", false, ["external"], [], "ACRE_PRC117F", [], ["intercom_1"]], false] call acre_api_fnc_addRackToVehicle
will add a rack (VRC103) to the vehicle pointed by the cursor named "upper dash" that cannot be removed (false). The radio will not be able to be accessed from inside and it will have by default an AN/PRC-117F. The rack will be connected to intercom 1.
Should I add that argument to the init field of the vehicle in order to add racks on it? If so, I have tried that but doesn't seem to work. The vehicle by default doesn't have radio racks and I'm trying to add them to make convoy missions with a variety of vehicles
I suggest you start familiarizing yourself with SQF scripting. Probably you are not using the API function properly. For example: cursorTarget has no effect in the init field.
Okay, I got the argument you gave me working, I just checked it out and what I want to use is acre_api_fnc_setVehicleRacksPreset
because I need to have the possibility to use the racks from inside the vehicles.
learned by doing, it's one of the best ways to learn I added;
[this, ["ACRE_VRC103", "Superior", "Alto", false, ["inside"], [], "ACRE_PRC117F", [], ["intercom_1"]], true] call acre_api_fnc_addRackToVehicle
to the Init of the vehicles and worked perfectly
Perfect! Closing the question!
Hi, I realized that some vehicles don't have radio racks (Dagor, Hemtt) and so, I'm looking to add them using ACRE2 API. The problem is that I don't know how to do it, for me the documentation is kinda confusing and I'm just struggling to make it work.