Search the Community
Showing results for tags 'scripting help'.
Found 4 results
-
Error 0 elements provided, 3 expected
Questioning posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Howdy! I've made a function for an Ai commander that I'm working on that checks all of the Blufor groups + vehicles and categorizes them into four categories: "Car", "Car Armed", "Infantry" and "Infantry AT." The problem occurs in the debug section (> Line 45) where I'm trying place a marker on all of the groups to represent their category. It works when I'm marking less than ~5 groups, but when I try to mark more I get the error: "0 elements provided, 3 expected." The issue is with line 47 (commented "Our problem child"). Thank you! Here is the code: // This is the script/function that determines the types of units a commander has. fnc_unitTypeCheck = { params ["_side", "_position"]; _comPos = getMarkerPos _position; _availableGroups = groups _side; //All units/vehicles near _comPos. _availableVehicles = _comPos nearEntities ["Car", 150]; _cars = []; _armedCars = []; { if(typeOf _x in carSet) then {_cars pushBack _x; _availableVehicles = _availableVehicles - [_x]}; } forEach _availableVehicles; //Finds all cars { if(typeOf _x in armedCarSet) then {_armedCars pushBack _x; _availableVehicles = _availableVehicles - [_x]}; } forEach _availableVehicles; //Finds all armed cars _infantryATGroups = []; //[west, "HQ"] sideChat "All groups: " + str(_availableGroups); //Checks unit in blufor to see if they have an AT launcher. If they do the group is marked as AT capable and added to the Infantry AT group. (Checks for AT infantry) { _groupATCount = 0; _currentGroup = _x; { { if((_x in ATLauncherSet) && (_groupATCount == 0)) exitWith {_infantryATGroups pushBack _currentGroup; _groupATCount = _groupATCount + 1; _availableGroups = (_availableGroups - [_currentGroup]);}; } forEach weapons _x; } forEach units _x; } forEach _availableGroups; _infantryGroups = _availableGroups; // Initilized after infantry AT groups - sets the infantry groups to the _available groups. (Only groups that are available still are infantry groups) //Debug -- Issue is here { _mkr = createMarker ["InfantrySquad " + str(_forEachIndex + 1), _x]; //Our problem child _mkr setMarkerShape "ICON"; _mkr setMarkerType "mil_dot"; _mkr setMarkerColor "ColorBlack"; _mkr setMarkerText "InfSquad " + str(_forEachIndex); } forEach _infantryGroups; //Creates a marker identifying every infantry group { _mkr = createMarker ["ATSquad " + str(_forEachIndex), _x]; _mkr setMarkerShape "ICON"; _mkr setMarkerType "mil_dot"; _mkr setMarkerColor "ColorOrange"; _mkr setMarkerText "ATSquad " + str(_forEachIndex + 1); } forEach _infantryATGroups; //Creates a marker identifying every infantry AT group { _mkr = createMarker ["car " + str(_forEachIndex), _x]; _mkr setMarkerShape "ICON"; _mkr setMarkerType "mil_dot"; _mkr setMarkerColor "ColorGrey"; _mkr setMarkerText "Car " + str(_forEachIndex + 1); } forEach _cars; // etc. { _mkr = createMarker ["armedCar " + str(_forEachIndex), _x]; _mkr setMarkerShape "ICON"; _mkr setMarkerType "mil_dot"; _mkr setMarkerColor "colorRed"; _mkr setMarkerText "Armed Car " + str(_forEachIndex + 1); } forEach _armedCars; }; -
[NEED HELP] Show video to players via addaction
sina alex posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
hello there i have a question about show video on billbord for players who are infront of it via add action, so we create a trigger and add below code on it: vp is name of the Addaction object call{[vp, "Pakhsh", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 2", "_caller distance _target < 2", {}, {}, { _video = "V\reza.ogv"; _screen = namayeshgar; _screen setObjectTexture [0, _video]; [_video] remoteExec ["BIS_fnc_playVideo", ([0, -2] select isDedicated), true]; m1 setObjectTextureGlobal [0,"P\rs.jpg"]; m2 setObjectTextureGlobal [0,"P\ma.jpg"]; }, {hint "Laghve tanzim";}, [], 5, 1000, false, false, true ] remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true];}; when i test this code i just find it the video is just visible by who call add action and not somebody else. how i can do it for all players infront of that billbord? -
Help with advanced editing (Trying to modify spotting distance)
flyingmadpakke posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm making a mission in which you control the camera of the MQ-4A-Greyhawk drone. It's flying at about 1000m altitude above an enemy base. You are supposed to identify a certain target and call a strike. The problem is the AI keeps spotting the drone, but I don't want them to do that. So what can I do to change that? I have tried editing with the advanced Eden mod, but I don't think it has the needed features. Ty :) Edit: more details on the symptoms (idk, maybe it's important). When the drone arrives you can see two patrols and some stationary dudes (more arrive by truck later). After some time they start looking up into the air in the direction of the drone (This is what I interpret as them spotting the drone). A little while later they break patrol and crouch/go prone while still looking in the direction of the drone, but From what I can tell, they never shoot at it though. -
Question/Request on making a "RHS ESCALATION" Type mission?
White_Zombie posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I have been looking for a new mission for my dedicated server for me and some buddies to play with the RHS Escalation Mission. Loved the similar missions in Arma 2 OA but, Since it is no longer updated, and I have no scripting knowledge, I had a few questions? First would be, All I want is to update the units to the new ones RHS has added, change the map, and the teams, I have a wish to try out the RHS Serb forces, but as this is something not originally created with the mod, I have no Idea what to do? Would this be simple or very complex? Is there a stand-alone tool like ADAM that I could use? At this point, I would even compensate(if that is allowed, or donate) if someone could just edit the mission for me. Just for private use. Any thoughts? :\ Thanks, WZ