|
Post by chaosriftgames on Aug 7, 2018 17:26:52 GMT
I have a very special use case AI and need to detect damage on body parts that cripples and changes animations depending on damage levels. Emerald AI was too basic for this and didn't do bodypart damage as far as I could tell.
I use a very similar system as invector where each Bodypart that can be damaged is a "Body Part" layer. Damage was originally done via raycast from the (very basic) FPS component and easily sent.
Would I simply need to add the "damage script" that invector has and use that to send an Ondamaged event to my script?
|
|
|
Post by chaosriftgames on Aug 8, 2018 1:51:47 GMT
I figured I'd follow a hybrid of Emerald AI's integration method and how Invector does it.
In the vprojectileControl I just added my own bodypart controller
BodyPartDamageReceiver myZombie = hitInfo.collider.gameObject.GetComponent<BodyPartDamageReceiver>(); if (myZombie) { myZombie.ReceiveDamage(Random.Range(minDamage, maxDamage), hitInfo); }
Then I just send the whole Hit (for now) to my controller, burst some blood, apply limb damage and deduct health from the main body.
|
|