Jump to content


  • Content count

  • Joined

  • Last visited

  • Medals

Community Reputation

72 Excellent


About Schatten

  • Rank
    Gunnery Sergeant

Profile Information

  • Gender
  • Location
    Minsk, Belarus

Recent Profile Visitors

393 profile views
  1. @soldier2390@hotmail.com, you can't delete finally compiled functions. But you can delete objects (crows) created by function: {deleteVehicle _x;} forEach bis_crows;
  2. @gc8, look at example 2: https://community.bistudio.com/wiki/allTurrets.
  3. need help with trigger

    @twistking, seems like result of isTouchingGround command is still inaccurate. However, it works fine for me, at least in VR map. Well, it is also possible to check altitude: this and {({((getPos (vehicle _x)) select 2) < 0.5} count thisList) > 0}
  4. need help with trigger

    @twistking, try this trigger condition: this and {({isTouchingGround (vehicle _x)} count thisList) > 0} Also change trigger activation to {(vehicle _x) setDamage 1;} forEach thisList; so that damage is done to vehicles, not to units inside them (it will also work if units will not in vehicles).
  5. help with a forEach command

    @reggaeman007jah, you missed brackets: if (_point2attack) then { {_x doMove _point2;} forEach allUnits; };
  6. @gokitty1199, https://community.bistudio.com/wiki/BIS_fnc_itemType.
  7. trigger condition !alive

    Sure, alive command accepts object, not side. You need to just set up trigger activation to OPFOR, not present. Yea, this is not exactly right condition, but if units do not leave trigger area, then this condition is quite suitable.
  8. @mcnools, put this code into "On act." field of trigger: { [_x] spawn { _unit = _this select 0; _unit setCaptive true; _weaponHolder = "GroundWeaponHolder_Scripted" createVehicle (getPosASL _unit); _unit action ["DropWeapon", _weaponHolder, currentWeapon _unit]; waitUntil { sleep 1; !(alive _unit) or {(currentWeapon _unit) == ""} }; if (alive _unit) then {_unit playMove "AmovPercMstpSsurWnonDnon";}; }; } forEach thisList;
  9. @mcnools, just put my code into forEach loop: { [_x] spawn {...}; } forEach thisList;
  10. Trigger activation: OPFOR, present. Condition: this and {(count thisList) < 3} On act.: [thisList select 0] spawn { _unit = _this select 0; _unit setCaptive true; _weaponHolder = "GroundWeaponHolder_Scripted" createVehicle (getPosASL _unit); _unit action ["DropWeapon", _weaponHolder, currentWeapon _unit]; waitUntil { sleep 1; !(alive _unit) or {(currentWeapon _unit) == ""} }; if (alive _unit) then {_unit playMove "AmovPercMstpSsurWnonDnon";}; };
  11. If you use addMagazines then rvg_money is magazine, right? If so then use removeMagazine.
  12. clear area after task done

    Well... According BIKI, distance command doesn't accept ARRAYS (except coordinates). But _players is array. So, you need to check distance to EACH unit something like this: _nooneHere = ({(_x distance _pos) <= (_radius + 100)} count _players) == 0; It's absolutely senselessly to do this: _x = grpNull; _x = nil; According BIKI, publicVariable command accepts variable NAME, not VALUE. But "str _array" returns string representation of _array. Possible resolution: myPubVar = _array; publicVariable "myPubVar"; General advice: read BIKI first.
  13. Use nearestObjects and alive comands.
  14. Well, I slightly improved my function: Now it can accept either trigger object or marker name. Also it counts ammo inside magazines. Example of output: [ [["hgun_P07_F", 1], ["arifle_MX_ACO_pointer_F", 1], ["launch_NLAW_F", 1]], [["16Rnd_9x21_Mag", 1, 13], ["30Rnd_65x39_caseless_mag", 1, 27], ["Chemlight_green", 1, 1], ["30Rnd_65x39_caseless_mag", 2, 30]], [["FirstAidKit", 1], ["NVGoggles", 1], ["V_PlateCarrier2_rgr", 1], ["U_B_CombatUniform_mcam", 1], ["H_HelmetB_sand", 1]], [["B_AssaultPack_rgr_LAT", 1]] ] You can handle this array using this code: {_crate addWeaponCargoGlobal _x;} forEach (_stuff select 0); {_crate addMagazineAmmoCargo _x;} forEach (_stuff select 1); {_crate addItemCargoGlobal _x;} forEach (_stuff select 2); {_crate addBackpackCargoGlobal _x;} forEach (_stuff select 3);
  15. @Undeceived, use this function: Usage: _stuff = [_trigger] call fnc_getStuffInsideTrigger; Example of result: [[["hgun_Pistol_heavy_01_F",5]],[["11Rnd_45ACP_Mag",2]],[["H_MilCap_gry",3],["V_BandollierB_blk",1]],[["B_Kitbag_rgr",2]]]