Jump to content

Blitzen88

Member
  • Content Count

    150
  • Joined

  • Last visited

  • Medals

Community Reputation

12 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Okay, thought count just returned a numerical value. Didnt know it could be used as a loop
  2. Whats the _dummy for? Also, how does it loop through all of the objects?
  3. ([Pos1, Pos2, Pos3], [Obj1, Obj2]) execvm .... First array (“Pos1”) would be available positions. These would be named objects. Second array (“Obj1”) are objectives (hostages, etc) that would be placed via the script. These would be named units, etc. _SelectedObject setpos getpos _RandomPosition; Thought this would move the objective to the position...? 
  4. Yes. The idea is to use the script with hostage rescue style missions. Since I play single player and I play my own missions, I know where an objective (hostage, etc) is placed. The idea is to randomly place the hostage from a selection of available positions. Once a position is “used” then that position should be removed. This is to prevent a situation where multiple hostages could be placed at the same location.
  5. Im trying to create a random position script for missions. The idea is the script will take an array of positions (placed objects) and, after a unit has been placed, that position will be removed from the array. Here is how it is called: ([Pos1, Pos2, Pos3], [Obj1, Obj2]) execvm Scripts/Misc/RandomPos. However, the script doesnt seem to recognize the array from the call/input...?
  6. This seems to work perfectly. Thank you! Now I gotta read up on “flatten” and “apply”
  7. Would only be used for single player. Dont know if that changes anything but I will checkout the wiki.
  8. Greetings, Im trying to figure out how to gather a magazine from each unit of a group and add it to an ammobox. The idea is that necessary magazines will be added to the ammobox regardless of the loadout. Here is what I got: But it isnt working...?
  9. Would disabling the default AI combat behavior work?
  10. Got a "clear building script" that orders friendly squad mates to move from building position to building position to clear a building. Script works great but squad mates will not move to a building position that is occupied by an enemy AI. For example, if an enemy AI is in building position #5 then the AI squad mates will move to positions 1, 2, 3, 4, and then stop at #4. Is there anyway to fix this? Here is the script: /*========================================================================================== Arma III AI Squad Mates Clear Building Created by WWI AI Mod Edited by Blitzen =========================================================================================== * WARNING: Script can be BUGGY! * Orders a player's AI squad mates to clear the building that the player is looking at * Intended to allow a player to quickly and, with as little headaches as possible, clear a building * Call with (Radio Trigger): Null = execVM "Scripts\Support\Support_PlayerGrpGarrison.sqf" ===========================================================================================*/ // Define Variables for the Clear Building Function //--------------------------------------- //Define some variables for the rest of the script _PlayersGroup = group player; _PlayerSquadMates = (units _PlayersGroup - [player]); //Save the Cursor target building _TargetedBuilding = Cursorobject; //Get Building positions from the building & count them _BuildingPos = _TargetedBuilding buildingpos -1; _BuildingPosCount = count _BuildingPos; //Call out / ID the building Player groupChat format ["Roger, clearing %1. Setting status to Careless",getText (configFile >> "CfgVehicles" >> (typeOf _TargetedBuilding) >> "displayName")]; //Cancel the script if no building positions are found if ((_BuildingPosCount) == 0) exitWith {Player groupChat "Unable to clear building - No building positions detected";}; // Create a Clear Building Function //--------------------------------------- Blitz_fnc_ClearBuilding = { //Define/Re-Define "New" Variables and make them private variables for the function private ["_unit","_BuildingPosCount", "_CurrentBuildingPos", "_Building"]; _unit = _this select 0; _BuildingPosCount = _this select 1; _Building = _this select 2; _CurrentBuildingPos = 0; _unit setbehaviour "CARELESS"; //Start the Movement Loop while {_CurrentBuildingPos <= _BuildingPosCount} do { _unit doMove (_Building buildingpos _CurrentBuildingPos); waitUntil {( unitReady _unit ) || !( alive _unit ) || (((expectedDestination _unit) select 1)!= "DoNotPlan" && ((expectedDestination _unit) select 1)!= "LEADER PLANNED")}; if(((expectedDestination _unit) select 1)!= "DoNotPlan" && ((expectedDestination _unit) select 1)!= "LEADER PLANNED") exitWith {}; _CurrentBuildingPos = _CurrentBuildingPos + 1; //End the Movement Loop }; _unit setbehaviour "AWARE"; [_unit] joinSilent (group player); }; // Have Units Call/Exec the Newly Created Function //--------------------------------------- { [_x, _BuildingPosCount, _TargetedBuilding] spawn Blitz_fnc_ClearBuilding }foreach _PlayerSquadMates;
  11. Blitzen88

    RHS Escalation (AFRF and USAF)

    Question: Can the RHS grip system be applied to vanilla models? Im trying to figure out if you can use the system to add a vertical grip to the Spar 16
  12. I think the script could be exited by using the currentCommand feature. Something like: if ( currentCommand _unit == "STOP" ) then { exit } else { *code*} However, I cant figure out how to implement it into the code. This way, the script should end if the units are given a stop command.
  13. Greetings, I am fooling around with a very basic script, called via a radio trigger, which orders a player's AI squad mates to "clear" a targeted building. AI squad mates "clear" the building by moving, one after another, to each building position. Although the AI can clear small buildings relatively well, with the AI being what it is, they sometimes get hung up. Is there anyway to build in an "If condition exitwith" statement which will exit the script if the squad mates are given a return to formation command (ie dofollow player)? I tried something like: if (_Playersquadmates !dofollow player) then {} else {exit} With the idea being that the AI squad mates are not following the player when they are moving to a position. If they were issued a regroup command then they would be following the player and the script would end. However, it didnt work. Does anyone have any ideas? Here is what I got: //Define some variables for the rest of the script _PlayersGroup = group player; _PlayerSquadMates = (units _PlayersGroup - [player]); _PlayerSide = side Player; _OriginalFormation = formation _PlayersGroup; //Save the Cursor target building _Building = Cursorobject; //Get Building positions from the building and count them _BuildingPos = _Building buildingPos -1; _BuildingPosCount = count _BuildingPos; //Try to sort the Building Positions in ascending order (closest to farthest) _BuildingPos sort true; //Dont try to run the loop if all of the squadmates are dead if ((count _PlayerSquadMates) == 0) exitWith {}; //Dont try to run the loop if there are no building positions if ((count _BuildingPos) == 0) exitWith {player groupchat "Unable to clear the building - no builiding positions detected"}; //Acknowledge the command Player groupChat " Roger, Clearing building"; //Put the units into a File formation before they clear the building {_x setformation "FILE"} foreach _PlayerSquadMates; //Start the Loop while {_BuildingPosCount > 0} do { //Select the first Building Position _position = _BuildingPos select 0; //Remove the Building Position from the array _BuildingPos = _BuildingPos - [_position]; //Subtract a Building Position/Number from the Building Count _BuildingPosCount = _BuildingPosCount - 1; //Order the Units to the designated Position {_x doMove _position; sleep 1} foreach _PlayerSquadMates; waituntil { {unitReady _x} foreach _PlayerSquadMates; }; sleep 1; }; Player groupChat "Building cleared, returning to formation"; {_x dofollow leader _PlayersGroup} foreach _PlayerSquadMates; {_x setformation _OriginalFormation} foreach _PlayerSquadMates;
  14. Blitzen88

    ARMA 3 Addon Request Thread

    Are there any addons which have IR laser & light combos that work well with the vanilla Ak12? Specifically ones where the IR laser is mounted on the top of the handguard (as opposed to the side). All of the ones I have found sit too low and clip into the weapon
  15. I tried this and it didnt seem to work. Here is what I did: Copied and pasted the code into init.sqf Identified a CSAT unit and then ran to the other side of the map The CSAT marker remained visible even when the unit was on the other side of the map. I suppose this test is based off of the assumption that the unit will no longer know about a target after a certain distance Is there any way to use BIS_Marta_getVisibleGroups to get a list of id'd groups, filter that list down to a selection of enemy groups, and then run that list of enemy groups to see if the players side knows about that particular unit? If not, then get rid of the marker(s)? If this is possible, then I dont believe you could use Marta_Hide because there is a chance that enemy unit could be re-identified after its initial identification Also, just out of curiosity, what does this part of the script do/mean: >-1}]; ==-1}]; Thank you for your help
×