Jump to content

cookies2432

Member
  • Content Count

    246
  • Joined

  • Last visited

  • Medals

Posts posted by cookies2432


  1. I'm using ryan's zombies and demons mod and i'm not using any scripts, all i'm doing is placing fences (barbed wire fence) and when i start shooting at them and they wanna attack me they just pass on through the fence and attack me. That's, what's happening. 


  2. Hello, i'm tired and about to go to sleep but I figured i'd ask this question and let it be during the night to see if I can get any good answers.

    I'm messing around in arma 3 and there's 1 thing that's bugging the hell out of me, ai walking through every single ******* object.

     

    Is there anything that I can do to stop the ***** AI to not go through the fences? The objects are fences. Thank you for reading a tired and angry fella's call for help. 

     

    //Cookies


  3. Wrong approach to the matter.

     

    The best and easy method to learn or get some idea is to have a look how others most skilled scripters had make its own projects.

    While you analyze such code it would be astonishing for you how they have done that.

    In meantime while you still learn you have not much clues what you can use and how.

    Analyzing someones script can give you more experience as you think.

    You do not need to use it if you are such individual person. Just have a look.

    Alright, thanks :)


  4. I would  do this in this way:

     

    1. Create array with weapons/magazines classnames

    2. Get all enterable buildings in one array.

        Here is something to re- think.

        Maybe would be better to set some locations and its  buildings arrays.

    3. Set distance detector to any player for each building

    4. Spawn random gear in random building when distance match

    5. Despawn gear when distance not match again.

    6. Set timer to delay spawn gear again for buildings where gear was taken

     

    Anyway there are so many loot spawners already created.

    I know, but I wanna make my own one to learn and not to copy anyone else's work :)

    • Like 1

  5. So, i'm trying to create a loot system but i'm not able to get it to work, I want it to spawn the items when I approach them (200m as of now)

     

    This is my code: (called from the player)

    fnc_nearbyHouses = {
    
      _plr = _this select 1;
    
            _houses = nearestObjects [_plr, ["house"], 200];
            _count = count _houses;
    
            for "_i" from 0 to (_count-1) do
    
            {
            houseClass = _houses select _i;
    
            if (houseClass isKindOf "house") then {
    
              for "_n" from 0 to 50 do {
    
                buildingSpots=_house buildingpos _n;
       if (str buildingSpots == "[0,0,0]") exitwith {};
    
                call fnc_lootSpawn;
            };
    
          } forEach _houses;
    
    
    };
    
    
    fnc_lootSpawn = {
    
    _plr = _this select 1;
    
    _lootItems = selectRandom [1,2,3,4];
    
          while {_lootItems > 0} do {
    
      _loot = ["hgun_Rook40_F","arifle_Katiba_F","U_I_Wetsuit","V_PlateCarrier2_blk"];
    
    
      _spawnItem = selectRandom _loot;
    
      _spawnedItem = createVehicle _spawnItem position houseClass;
    
    _lootItems = _lootItems - 1;
    
          };
    };
    

    I appriciate any help!

     


  6. fnc_pickup =
    {
    hint "fired";
    _item = _this select 0;
    _plr = _this select 1;
    _itemClass = typeOf (_item select 0);
    _indexNum = itemArray find _itemClass;
    _plrInv = profileNamespace getVariable "VirtualInventory";
    _amount = _plrInv select _indexNum;
    _plrInv set [_indexNum, _amount +1];
    profileNamespace setVariable ["VirtualInventory",_plrInv];
    _plrInv = profileNamespace getVariable "VirtualInventory";
    hint format ["%1",_item];
    
    deleteVehicle (_this select 0);
    
    };
    

    This is the code i'm using, the object calls it via an addAction put on the object however, in the future it wont be an addAction in its init line

×