Despawn vehicle patrol

Discussion in 'DZAI' started by Jun_msk, Nov 21, 2016.

  1. Jun_msk

    Jun_msk New Member

    Joined:
    Nov 21, 2016
    Messages:
    7
    Likes Received:
    1
    Hi!
    On the forum there is similar topic but it's closed.
    I was looking for, in what place removed vehicle patrol bots, but never found. In the files DZAI I opened vehicle, set ObjectID, ObjectUID, put in vehicle loot, added event message to the player that the vehicle will be lost after restart. Everything works, but when spawn a new patrol, the old vehicle is removed. I comment strings include deleteVehicle, did not help. Tell me which part of code is deleted? Thanks in advance!
     
  2. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    Where is the link to the DZAI you are using, there are multiple versions and I dont have it installed so github would be nice.
     
  3. Jun_msk

    Jun_msk New Member

    Joined:
    Nov 21, 2016
    Messages:
    7
    Likes Received:
    1
  4. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
  5. Jun_msk

    Jun_msk New Member

    Joined:
    Nov 21, 2016
    Messages:
    7
    Likes Received:
    1
    I'm delete strings include deleteVehicle _x, did not help.
    To verify inserted row diag_log format ["TEST %1.",_x], but in the rpt this strings is not appeared.
     
  6. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    Ok. So what you are saying happens is the players capture a vehicle from a DZAI. It despawns when the DZAI vehicle patrol is respawned.
    Are you SURE thats when its deleted and not during the cleanup process?
    Possibly the vehicle is not being deleted but is being moved by DZAI back to the new patrol spawn position?
    Possibly the issue is that the objectID is hard coded ? Is it? I am just offering possible solutions here.
    How about posting your RPT log (complete) showing the event.
     
  7. Jun_msk

    Jun_msk New Member

    Joined:
    Nov 21, 2016
    Messages:
    7
    Likes Received:
    1
    Dzai system works as a cycle with a predetermined frequency. Every 5 minutes to check the patrol required to spawn. For example, I destroyed a helicopter - start a process that adds patrol in an array of objects required you to spaw. At the time of the survey checks specified in configure the time between spawn. If the specified time has passed, spawn vehicle and removed from the queue.
    Selected from bots vehicle is lost, when a new patrol spawn.

    "Possibly the vehicle is not being deleted but is being moved by DZAI back to the new patrol spawn position?"
    Possible. I haven't fully figured out the structure of the system dzai bots.
    (sorry for my english)
     
  8. Jun_msk

    Jun_msk New Member

    Joined:
    Nov 21, 2016
    Messages:
    7
    Likes Received:
    1
    For example: player knocked an arrow from a helicopter. The helicopter touched down, the bots came out.
    _vehicle addEventHandler ["GetOut",{_this call DZAI_airLanding;}]; //Converts AI crew to ground AI units.
    In function DZAI_airLanding:

    if (_helicopter getVariable ["heli_disabled",false]) exitWith {};
    _helicopter setVariable ["heli_disabled",true];
    {_helicopter removeAllEventHandlers _x} count ["HandleDamage","GetOut","Killed"];
    _unitGroup = _helicopter getVariable ["unitGroup",(group (_this select 2))];
    [_unitGroup,_helicopter] call DZAI_respawnAIVehicle;

    In function DZAI_respawnAIVehicle:

    [2,typeOf _vehicle] call fnc_respawnHandler;
    and
    _vehicle setVariable ["DZAI_deathTime",diag_tickTime]; //mark vehicle for cleanup

    Long chain...
     
  9. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    But the dayz also deletes vehicles in server monitor or sched_ depending on what mod you are running.

    If the deletevehicle lines found in the github don't work, the problem must be elsewhere
     

Share This Page