Jump to content

Harzach

Member
  • Content Count

    3313
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

1027 Excellent

About Harzach

core_pfieldgroups_3

  • Occupation
    Audio Engineer

Profile Information

  • Gender
    Male
  • Location
    USA

Recent Profile Visitors

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

  1. Absolutely, plenty of ways to throw some randomness into it.
  2. Or a little tidier: nul = [] spawn { _array = [spot_1,spot_2,spot_3,spot_4,spot_5]; while {true} do { { gunner1 doTarget _x; sleep (random [5,10,15]); } forEach _array; } }; Just as an example, of course.
  3. You can place a few gamelogics at positions where you'd like them to look, then use doTarget on the "gunner". nul = [] spawn { while {true} do { gunner1 doTarget spot_1; sleep (random [5,10,15]); gunner1 doTarget spot_2; sleep (random [5,10,15]); gunner1 doTarget spot_3; sleep (random [5,10,15]); gunner1 doTarget spot_4; sleep (random [5,10,15]); gunner1 doTarget spot_5; sleep (random [5,10,15]); } };
  4. Just add it to the init, making sure to change "this" to "_this": ["AmmoboxInit",[_this,true]] call BIS_fnc_arsenal; ("O_IRStrobe" createVehicle position _this) attachTo [_this,[0,0,.44]];
  5. Harzach

    Deleting simple objects

    I guess the angle I was taking was more along the lines of: { if (_x in _array && (_x distance _center < 150)) then {deleteVehicle _x} } forEach _array; But my understanding was that you just wanted to delete ALL simple objects in your array within an area. Like this: nul = [] spawn { _array = []; for "_i" from 0 to 9999 do { _obj = createSimpleObject ["A3\Structures_F\Civ\Ancient\AncientPillar_F.p3d",[0,0,0]]; _pos = [["center"],[]] call BIS_fnc_randomPos; _obj setPosATL _pos; _array pushback _obj; }; sleep 5; _center = getMarkerPos "center"; { if (_x in _array && (_x distance _center < 150)) then {deleteVehicle _x} } forEach _array; }; Of course, nearObjects is far more elegant.
  6. Harzach

    Deleting simple objects

    Not necessarily? I think? It should be enough to check the array for elements within your desired area.
  7. Harzach

    Deleting simple objects

    Maybe add them to an array as you create them, so you can reference them later? Obviously adds another layer of complexity on both ends.
  8. Harzach

    MP scripting issues

    3) some scripts are executing on the server only Impossible to say until you share them.
  9. Harzach

    [Release] MIL_CAS

    playerunit is not a command. Where are you defining it as a variable? initPlayerServer.sqf runs every time a player connects, and the code it contains is run on the server only. In SP/hosted that means it runs on the player's machine. In MP, it runs on the server. Also, the original code uses the command player: if (player == CAS_player) then { which does not exist on the server. Either of these may explain why it works for you in SP and not MP. If you are defining your variable playerunit in init.sqf then that would also explain it, as init.sqf runs before initPlayerServer.sqf in SP, but after it in MP.
  10. Harzach

    [Release] MIL_CAS

    What is "playerunit" - where is it defined? Why are you using initPlayerServer.sqf ?
  11. Where/how are these scripts being run?
  12. Any command requires a specific syntax to execute properly. In the case of forEach, it is: {<code>} forEach [<array>] forEach also uses the magic variable _x to iterate the code through the array. Your snippet should then look more like this: {_x addEventHandler ["Killed", {hint "test 1 2 3";} ]} forEach _myArray;
  13. Harzach

    Local Variable in Global Space

    It's a valid error. CBA used to automatically wrap it, but now it seems it doesn't. There's nothing stopping you from doing it correctly.
  14. It absolutely does, but not while you are in any type of menu, including map/inventory.
  15. Harzach

    Help with Custom Script

    What page? That snippet is kind of a mess.
×