LoTekK 0 Posted November 30, 2005 Does anyone know if it's possible to poll the current animation being played on a unit? Kind of like how with some custom units like BAS or LSR Delta/Rangers you can check if the goggles are up, down, or currently animating. Is it possible in some similar manner to find out if the unit is currently playing the running animation, for example? Share this post Link to post Share on other sites
LizardX 0 Posted December 1, 2005 Do you look for the "animationPhase" command, buddy? It will return a number which is the status of your custom animation (0 is one end, 1 is the other end, the numbers inbetween are lineary/gradually show the phase). But there's a problem: as I know this command cannot be used for hard-coded animation like soldier body movement, flaps on planes, turret direction on tanks etc., only for custom, config+O2 based ones. I've seen a video from Inv44 guys, that showed they somehow managed to recognize the current status of soldiers (standing-crouched-prone), maybe you should ask them. Share this post Link to post Share on other sites
SWIFT88 0 Posted December 1, 2005 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class UserActions { class Lowervisor { displayName="Put goggles on"; position="brain"; radius=1.00000; condition="(this animationPhase ""goggles"" < 0.5) && (this animationPhase ""HelmetState"" == 0)"; statement="this animate [""goggles"", 1]"; }; class Raisevisor { displayName="Take goggles off"; position="brain"; radius=1.00000; condition="this animationPhase ""goggles"" >= 0.5"; statement="this animate [""goggles"", 0]"; }; class HelmetOff { displayName="Take off helmet"; position="Brain"; radius=0.1; sound={}; condition="this animationPhase ""HelmetState"" == 0"; statement="this animate [""goggles"", 0]; this animate [""HelmetState"", 1];"; }; class HelmetOn { displayName="Put on helmet"; position="Brain"; radius=0.1; sound={}; condition="this animationPhase ""HelmetState"" == 1"; statement="this animate [""HelmetState"", 0];"; }; you see the Statement Area asks whats nessary to allow the animation... So say it says Statement="this animate [""HelmetState"",0] means that its not currently animated so the user message for Helmet On is in the user action menu HOWEVER if you want it off you do the same but with this statement="this animate [""HelmetState"", 1];" Share this post Link to post Share on other sites
LoTekK 0 Posted December 1, 2005 Yeah, I've seen a couple things on recognizing the state of custom anims, but nothing on hard-coded anims. I'll try and get in touch with the I44 guys and see how that pans out. Thanks for the heads up. Share this post Link to post Share on other sites