Change death animation depending on hit force

Is it possible to change what happens to an AI character when he dies depending on the force that hits him. e.g if he is shot with a gun he dies in the normal way but if he is hit with something like and RPG he explodes. I have the animations and particle effects but unsure if this is possible without coding?
 

Andrew

Moderator
Staff member
When a melee weapon, shootable weapon or projectile collides with a target, there is an impact callback that can be used to get information about the attacking object, as described on these pages: Melee Weapon, Shootable Weapon, Projectile. In these, you can check the attackerObject to get the object that collided with the target. How you then perform the different death animations/effects etc. could then be changed.
 
When a melee weapon, shootable weapon or projectile collides with a target, there is an impact callback that can be used to get information about the attacking object, as described on these pages: Melee Weapon, Shootable Weapon, Projectile. In these, you can check the attackerObject to get the object that collided with the target. How you then perform the different death animations/effects etc. could then be changed.
Nice one, thankyou
 
Top