Page 1 of 1

Make AI melee

Posted: Fri Sep 05, 2008 5:04 am
by EchoRanger449
I know about the values in the act variant tag, but for non-elites that have the melee animation, they still will not use it.

An example was when I swapped the elite bipd with the cyborg for the energy sword elite variant.

I know that when you bump possession an elite, you still cannot control their melee animations- only if you get close to the elite's opponent will he melee, and even then he does it automatically. I think the melee command is different normally for AI than for players.

Edit: I thought it might be because the animation slot for the two weapon melee types, unlike the elite, was not filled in with the cyborg's animations. I'm still trying to figure out how to get the cyborg to melee as an actor variant.

Edit: I swapped the model and animations of the elite, and it creates the same problem. Either it's in the model (not likely unless there is some kind of marker involved), or it's something in the animations. It IS one of those two things, that I know.

Posted: Fri Sep 05, 2008 11:02 am
by DeadHamster
in the [actv] or [actr] tag, theres are melee range values. That way AI don't randomly melee 30 feet away from you, thats why you couldn't do it until you got close.

Posted: Fri Sep 26, 2008 10:28 am
by EchoRanger449
I know this is kind of a bump, but this needs to be answered with updated information:

I finally got the cyborgs to melee by using Halo CE tools:
1.) Extract every animation from the cyborg using bluestreak (gmax script)
2.) duplicate an existing animation from the 100 to 200-somthing list. I think you may need to change the animation file extention (like jmo,jmt,jma). Oh yeah, it will be in jmr, just change it to jma I think.
3.) Make sure the animation tag you will overwrite for the cyborg is the original and never compiled before. Back it up too.
4.) Compile all the animations in tool, then open guerilla. Fix all the animation's properties so they work like the original (this takes a LOT of time so only do this step for your final product, not for testing purposes)
5.) You want to look at how the elite's melee animations work and do that, using your "new" animation as the animation it uses. If you want the AI to have more types of animations for the different weapons it melees with, you should have duplicated more animations from step 2 (it looks wierd if the AI swings the assault rifle or rocket launcher like a pistol).
6.) Go down to the bottom of the animation tag where all the individual animation properties are. You need to look at the keyframe index and choose some value that will work well. So, I might want to look at that animation in gmax to see at what point it looks like MC's weapon hits the enemy. I look at the frames bars at the bottom of the window and look at which frame the animation is on. The frame number is what you right in the keyframe index box for the animation tag. Save the tag and compile any map that will include your new animation tag.
7.) You might want to convert the map to PC first (from what I understand), then extract the animation tag with HMT 3.5.
8.) Configure your spartan actv to melee and berserk, and wallah--you now have a spartan that melees!

Not easy, but hey, what's more kickass than an ally that melees, throws grenades, has shields, and can use just about any weapon?
*Hint: if you create more animations for the biped, you can get him to use ANY weapon and drive, ride, and gun any vehicle*

Though a lot of this was done with Halo CE tools, I'm showing you all how to make CE work for PC and trial modders.
Yes, I made my trial spartan hoard harass a few incompetent elites.
Watch this vid to see the result-
http://www.youtube.com/watch?v=6jUleJwnjzo

Posted: Fri Sep 26, 2008 10:57 am
by guysullavin
wasn't this already done by deadhamster?
Yup: http://forums.halomods.com/viewtopic.php?t=79347

Posted: Sat Sep 27, 2008 2:00 pm
by EchoRanger449
I don't think the word "melee" occurs once in the first post.

I think you should read the whole topic if you disagree.

Posted: Sat Sep 27, 2008 2:07 pm
by Philly
Thanks for sorting this out Echo. :) I think it's great when topic creators answer their own questions., just for the good of others. :)

Posted: Sat Sep 27, 2008 5:15 pm
by guysullavin
EchoRanger449 wrote:I don't think the word "melee" occurs once in the first post.

I think you should read the whole topic if you disagree.
whatever, im not a moderator.
its a good tut though :D