-
Content Count
155 -
Joined
-
Last visited
-
Medals
Everything posted by _foley
-
Marksman Character 2 primaire weapons?
_foley replied to DamianBope's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You might fit it in a large enough backpack. Otherwise you'll have to look for a mod. -
Excluding certain vehicles from a list
_foley replied to chow86's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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]) }; -
how to stop the forced respawn when players join server
_foley replied to Sp0oX's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Smooth line markers script (Foley_markers)
_foley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Check Role + Item requirement
_foley replied to CIC-07-STALKER's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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];- 1 reply
-
- 1
-
How do I find the in-game icons?
_foley replied to SpaydCBR's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Melody_Mike I used this script last time I searched for an icon, maybe that will help. -
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?
-
Is map in Inventory / Pick Up Map Task
_foley replied to Quack O'Neill's topic in ARMA 3 - MISSION EDITING & SCRIPTING
`in` makes case-sensitive comparison that's why it never matches the map. Try "ItemMap" instead of "itemMap". -
Stop Map Loading With Player In Centre ?
_foley replied to Quack O'Neill's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Find unit in array of vehicles
_foley replied to HonzaVinCZ's topic in ARMA 3 - MISSION EDITING & SCRIPTING
How about this if ((vehicle player) in _vehicleList) then {...}; -
I want to create an invisible sniper based on conditions
_foley replied to LuckyArma's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
You wanna do TaskDone = true; instead of {TaskDone = true};
-
Rearm code works in single player but not on dedicated server
_foley replied to Luft08's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
Rearm code works in single player but not on dedicated server
_foley replied to Luft08's topic in ARMA 3 - MISSION EDITING & SCRIPTING
At which point does it fail? Let us know if the trigger is getting activated, is your function actually being called. -
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"; };
-
How can I create a (alternative) road way to be used by AI vehicles?
_foley replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
sandbox [Release] Suicidal Doctrine Script
_foley replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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 😉- 14 replies
-
- 3
-
Helicopter damage
_foley replied to Iogann_KrauzerII's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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! -
Helicopter Shoot Down with VLS
_foley replied to tierdisogni1450's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; -
.sqf Scripting with Array + forEach + forEach into a forEach
_foley replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
init behaviour for AI to take shortest route and avoid roads.
_foley replied to d3rt13n's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Notice the difference between setBehaviour and setCombatBehaviour -
init behaviour for AI to take shortest route and avoid roads.
_foley replied to d3rt13n's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"; -
sandbox [Release] Suicidal Doctrine Script
_foley replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Looks quite detailed, well done!- 14 replies
-
Welding VBIED doors (impossible the crew leave the vehicle)
_foley replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
How to Set group's VariableName?
_foley replied to simicsko's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 };