Falsche9
Member-
Content Count
38 -
Joined
-
Last visited
-
Medals
Everything posted by Falsche9
-
Yes there was an error - it required a variable to check each group. - updated. I added: DEAD_VAR_GROUP1 = 0; DEAD_VAR_GROUP2 = 0; and the killed eventHandler for each group
-
//_hdl = [] execVM "test.sqf"; private ["_group1","_group2","_attackPos"]; DEAD_VAR_GROUP1 = 0; DEAD_VAR_GROUP2 = 0; _group1 = [getMarkerPos "spawn1", EAST, (configFile >> "CfgGroups" >> "EAST" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup; _group2 = [getMarkerPos "spawn2", EAST, (configFile >> "CfgGroups" >> "EAST" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup; _attackPos = getPosATL player; _SpawnWave = { { _x setSkill ["general",1]; _x setSkill ["aimingAccuracy",0.1]; _x setSkill ["aimingShake",1]; _x setSkill ["aimingSpeed",0.1]; _x setSkill ["endurance",0.3]; _x setSkill ["spotDistance",0.2]; _x setSkill ["spotTime",0.7]; _x setSkill ["courage",1]; _x setSkill ["reloadspeed",0.5]; _x setSkill ["commanding",1]; _x doMove _attackPos; } forEach (units _group1 + units _group2); }; {_x addEventHandler ["killed", { _grp = group (_this select 0); if ({ alive _x } count units _grp < 1) then { hint "All units gruppe1 dead"; DEAD_VAR_GROUP1 = 1; }; }]; } forEach units _group1; {_x addEventHandler ["killed", { _grp = group (_this select 0); if ({ alive _x } count units _grp < 1) then { hint "All units gruppe2 dead"; DEAD_VAR_GROUP2 = 1; }; }]; } forEach units _group2; [] call _SpawnWave; waituntil {(DEAD_VAR_GROUP1 == 1 && DEAD_VAR_GROUP2 == 1)}; _alarm = createSoundSource ["Sound_Alarm", position player, [], 0]; //{if (side _x == EAST) then {_x setDamage 1;};} forEach allUnits;// test for debug - kill them all I made a test of this in the editor - it is working. edit: updated - needed a variable for each group.
-
Carrying wounded soldiers
Falsche9 replied to Falsche9's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you for the help - I will look at the A2 module and with the animations try to script something. -
Is this available in A3 - I can't see a 1st aid module? If not does anyone have examples so an AI can carry a wounded soldier?
-
Set Killed event handler in initPlayerLocal.sqf
Falsche9 replied to florianmuellerch's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes it may be best to compile the Arma3 way: https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function -
Set Killed event handler in initPlayerLocal.sqf
Falsche9 replied to florianmuellerch's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I made this mistake as well: _index = player addMPEventHandler ["mpkilled", {hint format['Killed by %1',_this select 1];}]; -
assign/unassignItem or add/remove*weaponItem based on slot type?
Falsche9 replied to petsfed's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have a script for optics that someone helped me with - I changed it for you: run script from init.sqf - squad must all have silenced weapons: player setVariable ["gruppeMuzzleStatus", 1, true]; { _items = primaryWeaponItems _x; for "_i" from 0 to (count _items)-1 do { _klasse = _items select _i; _azl = getnumber (configfile >> "CfgWeapons" >> _klasse >> "ItemInfo" >> "type"); if (_azl == 101) then { _x setVariable ["unitMuzzleItem", _klasse, true]; }; }; } forEach units group player - [player]; player addAction ["<t color='#FFFF00'>Squad Go Loud</t>", { {_dmf = _x getVariable "unitMuzzleItem"; _x playMove "MountSide"; sleep 2; _x removePrimaryWeaponItem _dmf; } forEach units group player - [player]; player setVariable ["gruppeMuzzleStatus", 0, true]; }, "", 0.4, false, true,"","(player getVariable 'gruppeMuzzleStatus') == 1"]; player addAction ["<t color='#FFFF00'>Squad Go Quiet</t>", { {_dmf = _x getVariable "unitMuzzleItem"; _x playMove "MountSide"; sleep 2; _x addPrimaryWeaponItem _dmf; } forEach units group player - [player]; player setVariable ["gruppeMuzzleStatus", 1, true]; }, "", 0.4, false, true,"","(player getVariable 'gruppeMuzzleStatus') == 0"]; For this value: _azl = getnumber (configfile >> "CfgWeapons" >> _klasse >> "ItemInfo" >> "type"); Muzzle Accessory = 101 Sights Accessory = 201 Pointer Accessory = 301 -
Selecting a Pilot, Gunner, etc. in a Vehicle
Falsche9 replied to Kydoimos's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Pilot in right seat is always the driver, I have seen script where other crew (pilot in left hand seat, mans on guns) is called with turretUnit but can't find it now. http://community.bistudio.com/wiki/turretUnit _pilot = driver _airVehicle; _gunner = gunner _airVehicle; -
assign/unassignItem or add/remove*weaponItem based on slot type?
Falsche9 replied to petsfed's topic in ARMA 3 - MISSION EDITING & SCRIPTING
double post -
Detecting player in vehilce or on foot
Falsche9 replied to twisted's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_detected = (getPosATL Player) nearEntities [["Man","LandVehicle","Air"], 500]; diag_log (str (_detected)); return: "[O Alpha 1-1:1,O Alpha 1-2:1,O Alpha 2-1:1,B Alpha 1-1:1 (Falsche9),Agent 0x3ac8c080,Agent 0x3c08a080,Agent 0x3ac78080,O Alpha 1-3:1,Agent 0x3a466080,Agent 0x35278080,Agent 0x3a3e8080,Agent 0x3a4a2080]" I have here: 1x player, 1x soldier, 1x apc, 1x helicopter, 1x car. So the code does detect vehicles and other things - what is Agents? edit: snakes? -
The pictures of the Preikestolen are 1st class. I must now go there instead of the beach every summer!
-
The single player game gives much enjoyment with new content releases. I am starting to enjoy the game editor most of all.
-
How can the settings in post #1 be made to work on all enemy in a mission? The code is not finished?