Jump to content
Sign in to follow this  
Kydoimos

Killing AI whilst Playmove / Switchmove is Active

Recommended Posts

I've noticed that for some of the animations AI can be killed mid-animation; however, is it possible to get them to react mid-animation in a fluid way, thus abruptly ending the animation? For instance, if you shoot AI in the foot mid-animation, they'll just carry on playing out their animation as if nothing happened. Essentially, I'd like to be able to have enemy AI look at ease in their base, going about their business, whilst still being able to attack them. Is it possible? I managed to get it to work on a trigger once, with 'this switchmove ""' - but the animation jumped instantly to the combat stance, as if they'd teleported into readiness! If it's not possible, does anyone know if BI will implement such a feature upon completion? Have they in previous titles? I just feel the enemy AI seem a bit, robotic and static.

Share this post


Link to post
Share on other sites

I didnt play with the animation system yet, but maybe you can use playActionNow (it mentions smooth transistion) to request the unit to play some sort of very short / 0-length standing animation when he takes damage for the first time ?

Share this post


Link to post
Share on other sites

That's worth a shot! Thanks!

---------- Post added at 16:29 ---------- Previous post was at 16:28 ----------

Please, if anybody else has any ideas, I'd love to hear them! :)

Share this post


Link to post
Share on other sites

Use the BIS_fnc_ambientAnimCombat function. That'll allow them to react to combat.

Share this post


Link to post
Share on other sites

Thanks Kylania - but still no smooth transition. The unit jumps instantly to the combat ready pose. Maybe that's just how it has to be?

---------- Post added at 17:17 ---------- Previous post was at 17:00 ----------

Ignore my last stupid comment Kylania - I see what you mean, I don't need to play the animation, just call the function. Works like a charm! As always (and I do mean always) thanks for your help!

---------- Post added at 19:10 ---------- Previous post was at 17:17 ----------

I've been playing around a bit with the BIS_fnc_ambientAnimCombat and I noticed that there's animsets like "Guard", "Watch" etc. I've tried the following in the init box [this, "Watch"] call BIS_fnc_ambientAnimCombat; but an error box tells me that this is not a correct animset - even though it names the animset I've just written! I guess this is probably because they are not in the game until release?

---------- Post added at 19:13 ---------- Previous post was at 19:10 ----------

I've also tried it without the "", but then all I can get the unit to do is play the generic stand animation...

Share this post


Link to post
Share on other sites

Kydo,

you need to make sure the animation is in full caps.

also there are three parts required for that to work correctly -->with a 4th and 5th to transition to combat mode.

check the function viewer and its all in there for this one. just take the BIS_fnc from infront of the command to find it

edit:link to the full info my pasting seems to drop <CR> at the end of each line and makes it very unreadable.....

Edited by KevsnoTrev

Share this post


Link to post
Share on other sites

Ah, the caps made all the difference! It works now! [this, "WATCH"] call BIS_fnc_ambientAnimCombat - thanks KevsnoTrev! I'll remember to follow examples to the letter in future! :)

Share this post


Link to post
Share on other sites

Guys, don't suppose you know if there's a way to do something similar with the ambientcombatanim on the briefing animations? I'm guessing not. Just think it'd be awesome to create missions where enemy AI were talking amongst themselves. Especially for sniper missions, where you might like to take out an enemy officer. Just let us know if you know a way :). Really enjoying the ambientcombatanim - thanks for your help!

Share this post


Link to post
Share on other sites

Does anyone know any work-arounds for the following issues with the ambientcombatanim? It looks great, but I've noticed enemy AI do not react when they get shot from a distance. They just stand there and take the shots, flinching with every round that strikes them before they die. Also, they don't seem concerned when their comrades die. Unless you stand next to them and start shooting, they completely ignore you! Any ideas anyone? Am I doing it right?

Share this post


Link to post
Share on other sites

Kydo - I updated an example mission a few days ago, have a look in there.

I think I added {getdammage _this >0} to the fourth part of the ambientAnimCombat call line.

Basically when shot and injured at all change out of the anim pose.

If anyone can figure out how to use an eventhandler "FiredNear" in the same context that would be great.

example mission for both ambientAnim and ambientAnimCombat is here.

Share this post


Link to post
Share on other sites

Great stuff mate! I'll take a look at that! All we need now I that "firednear" and well, we're away!

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  

×