Custom hit sparks / flashes and death animations

mulambo

Member
Basically, my problem is that I need objects (such as boxes, barrels, etc..) to show no hit spark, and I also need enemies to be customized according to the hit received. I've already managed to customize their death animation, but it would be cool for them to have a custom death fall and fall2 animation when dealing with certain kind of attacks (example : burnt by a molotov or shot by a shotgun). Is it possible?
Currently the hit flash (the flash.txt default one) is a spark of blood, but it looks awkward when hitting a bloodless object... and enemies would look cooler if they felt and lied on the ground in different ways according to the weapon used (example: shot by shotgun they fall back with their head exploded, or hit by molotov they would fall back in flames then burn to a crisp once on the floor)
 
All that is possible with default/built in Openbor functions :)

For custom fall animations, simply use different attacks (attack3 will cause pain3 and fall3...)
For the pain3 and fall3, have your custom animation corresponding to attack type:

Shotgun (attack3) makes entity fall far back (pain3 /fall3 /death3)
Molotov (attack4) makes entity catch fire (pain4 /fall4 /death 4)


For barrels etc. To not show the hitflash of blood, use "flash" and "noatflash" in entity header:

noatflash {bi}
~When {bi} is 1, this entity will always play it's personal 'flash' when hit, instead of the attacker's. Useful for obstacles.
 
thanks a lot, I've used " flash 0 " at it worked as expected
I'll try that pain2,3,etc. when I'll finish the spriting and coding for the player, but I think it's gonna work anyway, thanks!
 
Back
Top Bottom