Jump to content

_foley

Member
  • Content Count

    155
  • Joined

  • Last visited

  • Medals

Everything posted by _foley

  1. You might fit it in a large enough backpack. Otherwise you'll have to look for a mod.
  2. That if condition does nothing - it is always true. If you have a list of units (civiliansInDanger) and you want to exclude units who are inside either of the two vehicles (offroad1, offroad2), you can do this: civiliansToStop = civiliansInDanger select { !((vehicle _x) in [offroad1, offroad2]) };
  3. If the problem is losing loadout and position, you can write a script that will save their loadout and position (getUnitLoadout, getPos) when they quit and set the loadout (setUnitLoadout, setPos) and position when they rejoin.
  4. Smooth line markers script for Arma 3 Features Draw complex line markers Generate smooth, curved or wavy lines Track position along a path Composable design (see: Advanced Usage) Quick start Copy the Foley_markers folder to your scenario: scripts\Foley_markers\ Add to your scenario's init.sqf: execVM "scripts\Foley_markers\init.sqf"; Try drawing some paths! Copy examples and paste them in the debug console. More screenshots Download (v0.1) https://github.com/foley-dev/arma3-line-markers/releases GitHub https://github.com/foley-dev/arma3-line-markers
  5. _foley

    Check Role + Item requirement

    Isn't that the case with vanilla Repair Specialist and Explosive Specialist roles? You can also do this on any unit: _mechanic setUnitTrait ["engineer", true]; _mechanic setUnitTrait ["explosiveSpecialist ", false]; _eod setUnitTrait ["engineer", false]; _eod setUnitTrait ["explosiveSpecialist ", true];
  6. @Melody_Mike I used this script last time I searched for an icon, maybe that will help.
  7. _foley

    "side" problem

    if (side _x == WEST) then  _x is undefined at that point so that's where it fails. Did you mean to put that if inside the foreach loop instead?
  8. `in` makes case-sensitive comparison that's why it never matches the map. Try "ItemMap" instead of "itemMap".
  9. Map is initially centered to where your unit is placed in the editor so one trick you can do is to place units in some unrelated area (i.e. at the edge of the map), and move them with setPos at the beginning of the mission.
  10. How about this if ((vehicle player) in _vehicleList) then {...};
  11. Tricky conditions, this says that a sniper can be invisible even if he's on an asphalt road and enemy walks right up to him. Either way, to achieve literal invisibility you can do a combination of: hideObjectGlobal, forgetTarget, perhaps setCaptive. Beware of locality quirks.
  12. _foley

    Tasks testing

    You wanna do TaskDone = true; instead of {TaskDone = true};
  13. Um, that function should run where vehicle is local, i.e. on pilot's machine, not on dedi. setVehicleAmmo, setFuel - these commands take local arguments. Is your trigger configured to be server side only?
  14. At which point does it fail? Let us know if the trigger is getting activated, is your function actually being called.
  15. _foley

    Rearm items

    Hey Try this to add no more than 4 grenades to inventory player addMagazines [ "vn_m67_grenade_mag", 4 - ({_x isEqualTo "vn_m67_grenade_mag"} count itemsWithMagazines player) ]; For first aid kits you will need to do it differently while { player canAdd "vn_b_item_firstaidkit" && ({_x isEqualTo "vn_b_item_firstaidkit"} count itemsWithMagazines player) < 5 } do { player addItem "vn_b_item_firstaidkit"; };
  16. As far as I know, vanilla AI doesn't exhibit any swarm behaviour that would cause this coordinated attack. Place more waypoints along the path you want them to take.
  17. @thy_ On the topic of code style, I suggest keeping the line length short (try to keep it below say 100 characters) and not using tabs to align the = signs. It looks beautiful on your screenshot but for people who don't open it full-screen on an ultra wide monitor or who have different font size or tabs configuration than you, it won't look so great. I think preview on GitHub speaks for itself 😉
  18. _foley

    Helicopter damage

    Take a look at https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage It gives you a few ways of checking which part of the vehicle was hit when damage is applied. If you detect that it corresponds helicopter body, then just return 0 so no damage is added to that part. Let us know how it goes, it's an interesting case!
  19. _foley

    Helicopter Shoot Down with VLS

    BIS_fnc_spawnVehicle returns an array and the vehicle you're interested in is the first element of that array. Try this: private _spawnResult = [getMarkerPos "marker_5", 140, "B_Heli_Light_01_F", _crew1] call BIS_fnc_spawnVehicle; _airframe1 = _spawnResult # 0;
  20. I'm not entirely sure what the goal is but maybe this example will help you get more comfortable with nested forEach and the magic variable _x. private _cars = [c1, c2, c3]; private _drivers = [d1, d2, d3]; { private _car = _x; { private _driver = _x; systemChat str [_car, _driver]; } forEach _drivers; } forEach _cars; I find it helps readability if you assign _x to something meaningful.
  21. Notice the difference between setBehaviour and setCombatBehaviour
  22. Judging by the screenshot, they are in safe or careless mode because driver of that IFV is turned out. Try this: (driver tank01) setBehaviourStrong "COMBAT";
  23. Couple more things you can do to prevent AI from jumping out are setCombatBehaviour and allowCrewInImmobile. _unit setBehaviour "CARELESS"; _unit setCombatBehaviour "CARELESS"; _vehicle setUnloadInCombat [false, false]; _vehicle allowCrewInImmobile true; That said, AI will still dismount in some extreme cases (i.e. when vehicle is flipped) regardless of those commands. If that's insufficient then you'll have to experiment with disableAI or replacing regular units with agents as phronk suggested. Also, you have a pretty sus condition there (_isDoorsWelded == true). Be sure that the body of that if statement actually executes.
  24. One way to achieve this is to give the trigger a global variable name instead. Then you can do this in your spawn script (assuming that your trigger is assigned to myAreaTrigger) _REDSquad1 = [getMarkerPos _spawnMarker,East, (ConfigFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad")] call BIS_fnc_spawnGroup; _REDSquad1 spawn { waitUntil { sleep 1; (leader _this) inArea myAreaTrigger; }; // Your "on activation" code goes here // _this refers to the spawned group };
×