T

tills13

Member

Last active 9 years ago

  1. 9 years ago
    Mon Apr 20 05:19:45 2015
    T tills13 posted in Issues with Custom Inits.

    @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

  2. Mon Apr 20 00:57:42 2015
    T tills13 posted in Issues with Custom Inits.

    yup - I got it now, thank you.

    Finally, I can actually make progress on my damn mission.

  3. Mon Apr 20 00:04:21 2015
    T tills13 posted in Issues with Custom Inits.

    gah use code tags >.<

    so the only change is that I need to use _this... and my_init?

    seems weird.

  4. Sat Apr 18 19:50:20 2015
    T tills13 posted in Issues with Custom Inits.

    ^ thanks @SpyderBlack723

  5. Sat Apr 18 19:34:48 2015
    T tills13 posted in Issues with Custom Inits.

    @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?

  6. Sat Apr 18 19:31:52 2015
    T tills13 posted in Issues with Custom Inits.

    @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.

  7. Wed Apr 15 07:33:39 2015
    T tills13 posted in Issues with Custom Inits.

    might actually be a bug with CBA, then. who knows...

  8. Sat Apr 11 22:05:52 2015
    T tills13 posted in Issues with Custom Inits.

    Anyone else have any ideas?

  9. Fri Apr 10 02:38:05 2015
    T tills13 posted in Issues with Custom Inits.

    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.

  10. Fri Apr 10 00:10:38 2015
    T tills13 started the conversation Issues with Custom Inits.

    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.

View more