Jump to content

Psyfox314

Member
  • Content Count

    13
  • Joined

  • Last visited

  • Medals

Posts posted by Psyfox314


  1. Ive followed your steps as above but sadly have not been able to get it to work.  :(

     

    description.ext  

    //You are right about B_medic_F being correct.

    class Extended_Init_EventHandlers {
    
        class B_medic_F { //  SoldierEB is  for EAST side, for WEST use SoldierWB, for INDEPENDENT use SoldierGB
        
            init = "(_this select 0) call fnc_createMed";
     
        };
    };
    

    functions.sqf

    fnc_createMed = {
    
    params ["_unit"];
    
        if !(getNumber(configFile >> "CfgVehicles" >> typeOf _unit >> "attendant") == 1) exitWith {};
        
            private _playerGroups = [];
            private _players = playableUnits + switchableUnits;
            {_playerGroups pushBackUnique (group _x)} forEach _players;
    
            if ((group _unit) in _playerGroups) then {
            
                null = [_unit, units (group _unit)] execVM "scripts\automedic.sqf";
                
            };
    };
    

  2. While I was reading through the XEH user information I came across this problem with the 

    making XEH init event handlers run when a unit respawns

    IMPORTANT: This feature will only work on the player's unit - AI units that respawn won't have their XEH init EH:s re-executed. (If someone can figure out a trick to identify playable units in a MP mission, this limitation could be removed)

     

    You wouldn't happen to have that trick would you? 

     

    Otherwise I'm trying out your other idea of using the ACE respawn modules init, but I cant figure out how to get it work in regards to the _this local variable.

    Any advice is welcome :)

     

     


  3. Hey thanks for the quick reply!

     

    The ai is spawning in using the ace respawn module and BIS respawns for the playable ai and players. the settings are "instant" in the desciption.ext file "respawn on the postition of death" in the multiplayer settings.

    I usually throw a grenade at the medic for "kill" the unit and then wait for the respawn.

    (note this is for MP scenarios).

     

    Hope that answers the question


  4. Hey all,

     

    Ive been using davidoss's ACE 3 edit recently and its been working brilliantly! Many thanks to bardosy and davidoss!

    However my scenarios are hitting a snag with the script no longer applying to the unit after it has died and respawned.

    Has anyone found a similar problem and solved it?

     

    Ive been looking for some work around with the addeventhandler 'respawn' but really have limited knowledge in scripting.

    The work around ive been trying is as follows:

     

    unit init: 

    this setGroupID ["Alpha"];
    
    dummy = [this, units (group this)] execVM "scripts\automedic.sqf";
    
    this addeventhandler ["respawn","_null execVM 'scripts\automedic.sqf'"];
    

    I was getting errors regarding line 35 but havent been able to replicate to show in a .rpt file.

    My guess is that the _null function isnt the correct call but honestly out of my depths to understand.

    Cheers

     

×