1. When I duplicate them to about 36, it lags to all mighty hell. Though, they are behaving rather nicely by basically bum-rushing me. I tried tuning the physics down, but they all start bouncing too much and then fall through the floor.
the problem is that you have every single AI character that you want in your world active and 'seeking' at once - most games don't do this, they have a smaller number of enemies that are active at one time, and spawn the other enemies as the player gets near them.
2. I can't see a way to alter their hitpoints. I saw it in the revive portion of the script, but not where it's initialized and that's a core script anyway so we need that expsed in the controller settings.
hmm...will look into this - might have been overlooked. easily enough done though. thanx for pointing it out.
3. I've yet to grasp what you've done with the animations. Mine aren't in one animation file, they're too long and specific for that and I have to bake my IK before I export so I can't re-edit that kind of thing easily and hope I can continue to have separate animation files.
I'm working on a version of the old 'soldier' character with the full set of animations - the animation blending is fairly simple to setup, but does take a bit of figuring out to get them all setup.
Basically the weapon animations are all 'upper body only' - and are layered on top of the primary 'move' motion, which provides all of the lower body / main animations. The various upper body motions are also layered on different motion channels which allows them to override lower-channel animations as necessary as well.
4. I don't understand how you've set up the motion blending between upper and lower body.
the simplest way to explain it is that there are a couple of OPR properties that you can specify:
MotionIgnoreObjectAndChildren Bip01
MotionIncludeObjectAndChildren Bip01 Spine1
so basically what you can do with these two is either 'ignore' a joint and it's children, or 'include' a joint and children. What the above does is ignore everything (Bip01 is the character studio 'parent' joint) and then includes the Bip01 Spine1 joint and children - giving me only the upper body motion from the animation.
Here's my full set of motions for the Soldier from Combat:Spec Ops that you can see in
this video:
LoadObject ForceRecon.FBX
LookAtCenter 0 1.5 0
LoadAnimation Idle combatIdle.FBX
LoadAnimation Walk combatWalkRifle.fbx
LoadAnimation WeaponHandheld WeaponHandheld.fbx
LoadAnimation CrouchWalk combatCrouchWalkRifle.fbx
LoadAnimation CrouchIdle combatCrouchIdleRifle.fbx
LoadAnimation IdleCrawl IdleCrawl.FBX
LoadAnimation ForwardCrawl ForwardCrawl.FBX
# Motions
AddMotion IdleMotion
MotionAnim Idle
MotionScalarRef 0.5
MotionSelectVar Velocity
MotionSelectMax 0.2
MotionFadeInTime 0.1
MotionChannel 0
AddMotion WalkMotion
MotionAnim Walk
MotionScalarVar Velocity
MotionScalarRef 2
MotionSelectVar Velocity
MotionSelectMin 0.2
MotionFadeInTime 0.1
MotionChannel 0
AddMotion CrouchIdleMotion
MotionAnim CrouchIdle
MotionScalarRef 0.5
MotionSelectVar Velocity
MotionSelectMax 0.2
MotionFadeInTime 0.1
MotionChannel 0
AddMotion CrouchWalkMotion
MotionAnim CrouchWalk
MotionScalarVar Velocity
MotionScalarRef 2
MotionSelectVar Velocity
MotionSelectMin 0.2
MotionFadeInTime 0.1
MotionChannel 0
AddMotion ProneIdleMotion
MotionAnim IdleCrawl
MotionScalarRef 1
MotionSelectVar Velocity
MotionSelectMax 0.2
MotionFadeInTime 0.1
MotionChannel 0
AddMotion ProneWalkMotion
MotionAnim ForwardCrawl
MotionScalarVar Velocity
MotionScalarRef 1
MotionSelectVar Velocity
MotionSelectMin 0.2
MotionFadeInTime 0.1
MotionChannel 0
AddMotion Move
MotionChild IdleMotion
MotionChild WalkMotion
MotionChannel 0
AddMotion CrouchMove
MotionChild CrouchIdleMotion
MotionChild CrouchWalkMotion
MotionChannel 0
AddMotion ProneMoveWeaponHandheld
MotionChild ProneIdleMotion
MotionChild ProneWalkMotion
MotionChannel 0
AddMotion WeaponHandheld
MotionAnim WeaponHandheld
MotionTimeVar LookUpDown
MotionIgnoreObjectAndChildren Bip01
MotionIncludeObjectAndChildren Bip01 Spine1
MotionChannel 0
AddMotion MoveWeaponHandheld
MotionChild WeaponHandheld
MotionChild Move
MotionChannel 0
AddMotion CrouchMoveWeaponHandheld
MotionChild WeaponHandheld
MotionChild CrouchMove
MotionChannel 0
5. Only the idle animation appears to be taken on mine, everything is a derivitive of that. However, death and attack seem to work with the right animation, but walk or run or anything like that uses the idle animation for some reason.
You need to setup the motion variables for your 'Move' animation properly based on the speed of the character's movement:
So if you have an 'idle' motion and a 'walk' motion like so (i've removed everything but the important bits):
AddMotion IdleMotion
MotionAnim Idle
MotionSelectVar Velocity
MotionSelectMax 0.2
AddMotion WalkMotion
MotionAnim Walk
MotionSelectVar Velocity
MotionSelectMin 0.2
What this does is specify that you have an idle motion that will only be selected (ie - played) when the motion variable 'Velocity' is below 0.2. The Walk motion is only selected if Velocity is above 0.2.
AddMotion Move
MotionChild IdleMotion
MotionChild WalkMotion
The Velocity variable is set automatically by the character script and will set your character to automatically switch between the two animations based on it's speed. The 'Move' motion itself is what the script calls (plays) to set the character in motion, and by updating the Velocity variable, the character will automatically switch animations based on how fast their are moving.
Adding a Run motion is the same, except that you would want to have a MotionSelectMax for your walk motion as well. You can see an example of this in the Simple Character.opr
My number one concern is how we can go about getting exactly 36 AI entities to move towards and attack the player without the game dropping to 1 FPS
If you want dozens of AI characters active in a world at once you probably need to be doing the AI differently - for example using a higher-level 'hive mind' kind of script that controls more than one enemy.
The other option is to reduce the amount of time that each Ai script is being calculated - so only a small sub-set of characters is 'active' at one time - this is what alot of games do. The AI characters basically do a round-robin style of processing, so they only update the player's position etc every so often, instead of continually processing.
Either way, your probably going to require custom scripting for this - which is one of the nice things about the layered system that we're using for the AI - you can create / modify the AI script and still use the lower-level functionality that the character / weapon scripts use 'as is'.