Stopping The Death Animation
#1

I have some code where I send the player through their own death animation, after a specified amount of time I set their health to 0 to actually kill them. The problem is that once I set their health to 0, the in-built animation from San Andreas runs it's course which looks ugly and tacky after I've already animated the player to die. Is there anyway to prevent this in-built animation from occuring or a way to make it look not so bad?

At the moment I'm trying to clean it up by saving the players pos/camera pos, teleporting the player away (hiding them) and leaving the camera at the scene of the players death.. this works somewhat but isn't 100% the way I want it.
Reply
#2

try adding.. ClearAllAnims,or whatever that code is. With OnPlayerDeath?
Reply
#3

Quote:
Originally Posted by DiddyBop
Посмотреть сообщение
try adding.. ClearAllAnims,or whatever that code is. With OnPlayerDeath?
Sorry, I should have added that all other deaths should act normally. Thank you for the suggestion though!

I should clarify: the animation that I use has the player laying on the ground, the player shouldn't have animations cleared or else they won't be laying on the ground afterward
Reply
#4

Quote:
Originally Posted by Simon
Посмотреть сообщение
Sorry, I should have added that all other deaths should act normally. Thank you for the suggestion though!

I should clarify: the animation that I use has the player laying on the ground, the player shouldn't have animations cleared or else they won't be laying on the ground afterward
ah, so your saying, the normal onplayerdeath anim is going OVER your anim for death?
Reply
#5

Yes. I found a way to resolve it now, instead of killing the player I just call the OnPlayerDeath myself (using it like any other function) then respawn the player.. it seems to work fine. I just hope there's no bad side effects!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)