Common - Add more loadout randomization options#1783
Common - Add more loadout randomization options#1783DartRuffian wants to merge 19 commits intoCBATeam:masterfrom
Conversation
Only add extra mags in InitPost, prevents duplicated mags if mission maker edits loadout.
There was a problem hiding this comment.
I'm not exactly sure what causes the animation to be wrong (e.g. in the rifle holding anim when the unit only has a pistol). I don't remember ever seeing it before working on this pr though, so I added a workaround for it.
It seems to need to run on the next frame, but CBA's frame functions don't work in Eden so I had to use a sleep with a small delay.
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
| }] call CBA_fnc_addEventHandler; | ||
|
|
||
| // Check missionTime so Eden placed units don't have their loadouts randomized twice | ||
| ["CAManBase", "InitPost", { if (CBA_missionTime > 0.1) then { call CBA_fnc_randomizeLoadout } }] call CBA_fnc_addClassEventHandler; |
There was a problem hiding this comment.
Not sure if there's a more proper way to do this
There was a problem hiding this comment.
xeh_postInit won't run on 3den (for now at least)
There was a problem hiding this comment.
The check is so units spawned in Eden don't have their kits randomized again, but units spawned later (e.g. script / zeus) do
Without the missionTime check Eden placed units would have their loadouts randomized on mission start
Add delay to eden fixAnimation call to not change animations when creating editorPreviews.
|
Been over a year since this was opened, could some take a look again? |
When merged this pull request will: