Member
Last active 9 years ago
@SpyderBlack723 You need to put this at the top of the sqf that is being triggered
...
I think you mean
my_init = "[b]_this[/b] call (compile preprocessFileLineNumbers 'ai_init.sqf')";
but yeah, thanks
yup - I got it now, thank you.
Finally, I can actually make progress on my damn mission.
gah use code tags >.<
so the only change is that I need to use _this
... and my_init
?
seems weird.
@SpyderBlack723 Someone else on the CBA bi forums page is having problems with it too, Says it doesn't work on RC6 but does on RC4.
can you link me the post so I can keep myself updated there?
@highhead It has never worked this way :)
class Extended_Init_EventHandlers {
class Man {
init = "_obj call (compile preprocessFileLineNumbers 'my_script.sqf')";
};
};it needs to be
init = _this call (compile....) -------> not _obj
need to update wiki again!
I got that from the wiki... and it works, just not on OPFOR/BLUFOR.
might actually be a bug with CBA, then. who knows...
Sure.
INS_fnc_initAIUnit = { private ["_unit"]; _unit = _this; _unit setSkill ['aimingAccuracy', 0.2]; _unit setSkill ['aimingShake', 0.5]; _unit setSkill ['aimingSpeed', 0.2]; _unit setSkill ['spotDistance', 0.4]; _unit setSkill ['spotTime', 0.4]; _unit setSkill ['courage', 0.5]; _unit setSkill ['reloadSpeed', 0.5]; _unit setSkill ['commanding', 0.5]; _unit setSkill ['general', 0.5]; _unit addEventHandler ["Killed", INS_fnc_onDeathListener]; }; INS_fnc_onDeathListener = { ["unit died", true, true] call dl_fnc_hintMP; _tempRandom = random 100; if (_tempRandom > (100 - 100) || true) then { _unit = _this select 0; _pos = position _unit; _intel = createVehicle ["Land_Suitcase_F", _pos, [], 0, "CAN_COLLIDE"]; _intel setVariable ["INTEL_STRENGTH", (rank _unit) call INS_fnc_getRankModifier]; [_intel] spawn { // do stuff }; }; }; _obj call INS_fnc_initAIUnit;
The only time the ["unit died", true, true] call dl_fnc_hintMP;
fires is if it's a civ.
I've followed the code here .
I've got
class Extended_Init_EventHandlers { class Man { init = "_obj call (compile preprocessFileLineNumbers 'ai_init.sqf')"; }; };
in my description.ext
But the init only seems to apply to civilian units, not CSAT forces. Is there any reason for this? Or is there another way to do custom unit inits.