Jump to content

Gameadd1cted

Member
  • Content Count

    61
  • Joined

  • Last visited

  • Medals

Posts posted by Gameadd1cted


  1. ok. There is indeed a problem with AI unit's weapon in the following conditions (unit SN2 in the mission):

    - OA only, ACE users not concerned

    - Solo only, multiplayer not affected

    In your mission the AI units named SN1 and SN3 have no weapon because they have no loadout in LEA. In case you want to use default ArmA 2 loadout for these units you must check in the box "Do not script this loadout" in right upper corner.

    Thanks a lot for your quick answer.

    I confirm your findings (did some quick tests on a dedicated).

    Can we hope for a fix in SP (for testing purpose)?

    Or do we simply have to assume that LEA is for MP?

    Keep up the good work!

    --------------

    I am also trying to add "Tripod Bag" and "M252 Bag" to an empty HMMWV (SOV).

    These 2 items won't appear neither in SP nor in MP (dedicated).

    According to Kylania's Vehicle Cargo Capacity Chart, the HMMWV (SOV) should take 7 packs.


  2. Major,

    I must insist... the AI has no weapons.

    Steps to reproduce:

    - in the editor, place a BLUFOR unit (the player).

    - in the editor, place an OPFOR unit. Give it a name.

    - start LEA.

    - Generate loadout.sqf

    - Load mission in ARMA

    - note that the AI unit now has no weapons.

    Notes:

    - I only tried it in SP missions (didn't have the time to chechk it on a dedicated)

    - it worked the previos build (I guess it was 1.1.38)

    Let me know if you need additional feed-back.

    Thank you for your great work.


  3. Changed: remove of the loadout initialization of AI playable units on dedicated server due to issues with player at mission start.

    Is this final? It's a great feature to be able to assign loadout for AI.

    Related to this, I think I stumbled across a bug: there is no loadout initialization for AI units (I mean those not plyable).

    Fixed: No firing weapon if player got only a pistol.

    Great ;)


  4. Thanks guys for your help.

    I attach the code.

    It works only on dedicated server as playableUnits returns an empty array in SP.

    private ["_unit","_killer","_vehicles","_y"];
    _unit = _this select 0;
    _killer = _this select 1;
    _vehicles = [];
    
    
    [color="Gray"]//Detect possible run over[/color]
    if (_killer == _unit) then
    {
       _vehicles = nearestObjects [_unit, ["car"], 20];
    
       {
           _y = _x;
           {if (driver _y == _x) then {_killer = driver _y;};
           } forEach playableUnits;
       } forEach _vehicles;
    
    };[color="Gray"]//if over run[/color]
    
    if (side group _killer == west) then
    {
    	a3d_int_civilian_killed_by_west = a3d_int_civilian_killed_by_west + 1;
    	publicVariable "a3d_int_civilian_killed_by_west";
    };
    [color="gray"]//Must use side group. Otherwise side would return "ENEMY" for renegade units[/color]
    
    if (side group _killer == east) then
    {
    	a3d_int_civilian_killed_by_east = a3d_int_civilian_killed_by_east + 1;
    	publicVariable "a3d_int_civilian_killed_by_east";
    };
    
    [color="gray"]//Total civilian death toll[/color]
    a3d_int_civilian_killed = a3d_int_civilian_killed + 1;
    publicVariable "a3d_int_civilian_killed";
    [color="gray"]//a great example for publicVariableEventHandler can be found at:
    //http://derfel.org/arma2/publicvariable_and_pveventhandler.html

    [/color]

    The radius for detecting the nearest vehicles might be decreased.

    Nevertheless, nearestObjects returns an array ordered according to the distance, so it shouldn't be a problem.


  5. I am trying to synchronize all the civilians spawned by the ALICE module to a First Aid: Battlefield Clearence. It doesn't work :(

    this setvariable  [ "ALICE_civilianinit",  [{ _this addeventhandler ["killed", {if (isServer) then {_this spawn a3d_fnc_civilian_killed}}]; hint "Civ created"; Modules_FABC synchronizeObjectsAdd [_this]}]  ] call bis_fnc_variablespaceadd

    Nevertheless, the player unit and an editor placed civilian have the following init:

    Modules_FABC synchronizeObjectsAdd [this]

    As you can imagine, I can drag the editor placed civilian, but not any spawned by ALICE.

    Modules_FABC is the name of the module.

    The hint works (whenever a civilian is spawned, it pops).


  6. Hi,

    Ia BLUEFOR / OPFOR fires at and kills a civilian with a "killed" event handler, it will return the killing unit / object.

    Nevertheless, if you run over a civilian (let's say a traffic accident), it will not return the killer.

    Moreover, I noticed at the end of the missions that Arma does not take into account death provoked by such accidents.

    Is there any way we can know the killer who ran over a civilian?


  7. Once a BLUEFOR kills 5 civilians, it becomes a rendegade.

    Nevertheless, the kills from the renegade unit should still be accountable to the original side.

    Therefore the following code stops adding to the counter.

    if (side _killer == west) then
    {
    	a3d_int_civilian_killed_by_west = a3d_int_civilian_killed_by_west + 1;
    	publicVariable "a3d_int_civilian_killed_by_west";
    };

    I also tried:

    if (side [color="Red"]group [/color]_killer == west) then
    {
    	a3d_int_civilian_killed_by_west = a3d_int_civilian_killed_by_west + 1;
    	publicVariable "a3d_int_civilian_killed_by_west";
    };

    The counter still stops after 5 civilian victims.

    Is there anyway I can obtain the original side of the unit before becoming a renegade?


  8. Hi,

    I am working on a script trying to count the civilian deaths (victims by WEST, EAST, other). It works, nevertheless victims killed by a vehicle are not counted for a specific side.

    if (side _killer == west) then
    {
    	civilian_killed_by_west = civilian_killed_by_west + 1;
    	publicVariable "civilian_killed_by_west";
    };

    This is probably very obvious, but how an I check if the returned object from an event handler is a vehicle or a man?

    I tried

    if (vehicle _killer != _killer) then {hint "Veh"} else {hint "Infantery kill"}

    I try to get to side of the commander or the gunner of the killing vehicle.

    Thanks.


  9. PvPscene,

    It works :yay: Thanks a lot :)

    Now, why does it happen so? This is my guess:

    player returns null on a server.

    However, player can be null for a short period of time on a client machine (until it synchronizes?)

    So, if the machine is a CLIENT and player isNull => JIP

    The sleep in the init code resulted in player not being Null.

    Therefore the code would never catch a JIP state.

    Is this correct?

×