astruyk / Ares

An arma3 mod that adds some extra functionality to Zeus
51 stars 11 forks source link

Animations on units in Zeus #196

Open sergio47 opened 9 years ago

sergio47 commented 9 years ago

i saw Ares was using some code of the Curator Presets Mod,the most thing i ever want is add animations on units in Zeus,is there any possible?

TheOtherTaylor commented 9 years ago

Oh man, I've wanted this too. If Anton doesn't already have a solution, I might be able to poke this issue this weekend.

astruyk commented 9 years ago

Feel free to tackle it if you'd like. I just don't have the time to fiddle with it ATM.

On Fri, Jun 26, 2015 at 1:37 PM, TheOtherTaylor notifications@github.com wrote:

Oh man, I've wanted this too. If Anton doesn't already have a solution, I might be able to poke this issue this weekend.

— Reply to this email directly or view it on GitHub https://github.com/astruyk/Ares/issues/196#issuecomment-115802712.

sergio47 commented 9 years ago

@TheOtherTaylor dude,if u can do that ,u will be my hero,because in every mission of mine,i nned to add code to unit by mcc,and this doesnt work everytime,and the ai with code didnt react when they got shot,so plz do that!!!

TheOtherTaylor commented 9 years ago

So I've been researching into the problem but haven't actually had the time to fully tackle it. Figure I'd put up what I've found in case anyone has any insight they can contribute:

BIS_fnc_ambientAnim - Best set of continuously playing idle animations. Units are unable to leave animation or react to anything while in these. I also had an issue where some of these animations weren't propagating to all players on the server ("REPAIR_VEH_KNEEL") while others would play for a while then just stop ("KNEEL_TREAT"). There's no direct command to leave animations, but something like this:

{dude enableAI _x} forEach ["ANIM","AUTOTARGET","FSM","MOVE","TARGET"]; detach dude; dude switchMove "";

might work.

BIS_fnc_ambientAnimCombat is similar with animation end conditions, but has a much smaller list of available stand/watch animations. I'm not yet sure what a good universal end condition will be for this, if used.

playmove and switchmove are, of course, available for playing from the larger list of animations, but they do not run continuously and would require a loop solution. Not sure if this would run at risk of causing lag.