Jump to content
rofz

init EventHandler being overriden?

Recommended Posts

So, I've been experimenting with the creation of a faction mod. It happens that I play Dynamic Recon Ops a lot, and it makes my life easier to all the units already pre-configured. Unfortunately, it does not really work like that, as many DRO mods available tend to override your faction config and randomize it (except when you set up a custom loadout in DRO's mission lobby).

 

What I would like to accomplish is something like this:

 

        class EventHandlers : EventHandlers {
            class CBA_Extended_EventHandlers : CBA_Extended_EventHandlers_base {};
            init = "if (local (_this select 0)) then {_onSpawn = {_this = _this select 0;_this setName ['Jennifer Jackson','Jennifer','Jackson'];_this setNameSound 'Jackson';_this setUnitRank 'MAJOR';_this setSpeaker 'rhs_Female01ENG'; _this setPitch 1.1; _this setFace 'TCGM_Fem_Gonzalez';_this assignTeam 'BLUE';_this setUnitTrait ['Medic', true];_this enableIRLasers true;_this setSkill 1;_this enableFatigue false;_this setCombatBehaviour 'STEALTH';_this setUnitCombatMode 'BLUE';[_this, 'BSKULLS_Insignia'] call BIS_fnc_setUnitInsignia;reload _this};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
        };

 

I have basically a different version of the same init script for all faction units.

 

I have already tried generating the config using Drongo's Config Generator and Alive Orbat, with mixed results but no success whatsoever.

 

Note: it works fine when the unit is added via Eden or Zeus.

 

Is it possible to prevent a particular mission to override your faction's init?

 

Any suggestion would be greatly appreciated.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×