Ace3: make turret blow off compatible with an animationSource

Created on 12 May 2019  路  4Comments  路  Source: acemod/ACE3

Description:
https://github.com/acemod/ACE3/blob/master/addons/cookoff/functions/fnc_blowOffTurret.sqf

Currently, it will only work with destrType = "DestructWreck";
This requires an useless turretless hull model to be made.

It would be cool to have it work with an hide animationSource too when destrType = "DestructDefault"; is active. This way, one can assign turret and gun to a namedSelection, hide it, and let the turret model spawn in the air. This would have the big advantage to be hiddenselection friendly by keeping the hull customisations (texture, amovible parts, etc.)

kinquestion

Most helpful comment

Ok we included it internally https://github.com/bux/IFA3_ACE_COMPAT/pull/46

(sorry but I don't talk SQF so I don't have much insights :D

All 4 comments

Can you give me an example of how this would work?

As far as I can tell you can do this already by adding a addTurretToEditable event to the server machine that checks the vehicle classname and does the hiding.

if (isServer) then {
    ["ace_cookoff_addTurretToEditable", {
        params ["_vehicle", "_turret"];

        if (_vehicle isKindOf "My_AwesomeCar") then {
            // hide _vehicle something, may need remote execution
        };
    }] call CBA_fnc_addClassEventHandler;
};

The event has a weird name, but that could be changed if you want to go this route.

@commy2: there would be a simple check to add to the script itself (to avoid external manipulation). IF ACE_HideTurret exist in the vehicle's cfg AnimationSources THEN the script would trigger it (animationState=1) before spawning the turret as it is now. ELSE it would work as it is now.

What do you mean by "external manipulation"? Do you want to avoid putting a script in your mod?

Ok we included it internally https://github.com/bux/IFA3_ACE_COMPAT/pull/46

(sorry but I don't talk SQF so I don't have much insights :D

Was this page helpful?
0 / 5 - 0 ratings