Jump to content
Sign in to follow this  
Ink.

Animation Help?

Recommended Posts

Alright, so I'm trying to set something up with the usage of animations and I've run into a problem.

First, I don't want to use triggers via the editor because I need this to be done at my command whenever via Esc Key --> Local Exec and on my own squad mates. I've come into a few issues.

player playMove "Acts_LyingWounded_loop"; // Simply isn't working. It's a cutscene animation that I'm trying to force a unit to play and it won't do it.

I have one unit that is stuck in an animation and I can't get him out of it. And another that is also stuck in the animation but he keeps gliding forward whenever I'm selected to play as him and I can't stop that either.

Essentially I want to find a way where I can set up animations fairly easy for the other actor squadmates I have, being able to apply the animation to them via local exec and stop it when I need them to be usable again to set up the next shot.

Edited by Ink.

Share this post


Link to post
Share on other sites

Animations are pretty finicky. I find that playMove is great but very few animations properly support it (it isn't playing just an animation but all incoming and outgoing transition animations as well). switchMove is more reliable but not all units will do the anim. Best bet is to make sure that in the anim previewer, you have the correct unit selected. Also, be willing to try different animations until you get one that works. The system is far from bulletproof.

Das

ps - that explains the guy that won't play the proper animation. For the guy that is stuck, try clearing his anim with a playMove "" or switchMove "". The empty animation declaration is supposed to return them to the proper control.

Share this post


Link to post
Share on other sites

I got an aditional question here if you don't mind.

Let's say I want a unit play some animation on another unit (e.g. the carry wounded animation).

Now when my "Medic" (actorActive) is in a 2m radius from the wounded (actorPassive), how would I position him correctly so the animation started with the playAction/switchAction command will play near the wounded?

I tried the relPosObject function but it disables animation on its target object/argument (i.e. the actorActive).

-> I know the enableSimulation command but is there a more elegant solution to that?

Furthermore the relPosObject function is the only function I found to be able to position its target argument with an

offset to another object/unit, so the relPos function would be less handy in this case.

Maybe you got an alternative solution as well...

thx

Share this post


Link to post
Share on other sites

I hope you don't mind me butting in but I have an anim question also I need help with. I'm building a sniper mission where our target is an officer. The officer will walk around town on waypoints, talking to sentries as he goes. Each time he stops to talk I want him to play an anim then move off to the next & carry on doing this until we kill him. I know how to to enable switch move. The officer will be walking within a group i hope. My questions are:

1) what's the easiest way of getting the officer to do the above - follow waypoints, perform chat aims & then move to the next

2) what's the best code to allow him to be killed as while playing the aims I believe they can't be killed.

Many thanks for any help

Share this post


Link to post
Share on other sites

Regarding Pipyn1970's questions:

1) Use Move and Talk waypoints. Move to the position you want. Then Talk WP to execute the swithchmove on the officer. Use the MIN Timeout on the Talk trigger to keep the officer officer at the Talk WP for whatever duration you want. Move --> Talk --> Move ---> Talk etc.

2) Put a Killed eventhandler on the officer, and in that use a switchmove ""; to end the animation.

I think shooting him while in animation will actually kill him, but he may be stuck in the animation anyway. Prove to yourself first that he gets stuck in the animation. If so, then try the suggested Killed eventhandler.

Regarding LeoB's question:

You can try modelToWorld to return a relative position that you want to setpos the unit to. Should work fine.

Share this post


Link to post
Share on other sites

I have an additional question (I haven't tried the answers Das gave me yet, HW keeping me busy).

Theres an animation that literally has no duration, it's an animation that is supposed to be with a soldiers hands behind his back standing straight up (dont have the full name atm). It's somethingsomething_Ease. However when I have a unit play it, it puts the animation, but then undo's it and retrieves a weapon or whatever they had.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×