Stopping The Death Animation - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Stopping The Death Animation (
/showthread.php?tid=171573)
Stopping The Death Animation -
Simon - 27.08.2010
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.
Re: Stopping The Death Animation -
DiddyBop - 27.08.2010
try adding.. ClearAllAnims,or whatever that code is. With OnPlayerDeath?
Re: Stopping The Death Animation -
Simon - 27.08.2010
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
Re: Stopping The Death Animation -
DiddyBop - 27.08.2010
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 ![Tongue](images/smilies/razz.gif)
|
ah, so your saying, the normal onplayerdeath anim is going OVER your anim for death?
Re: Stopping The Death Animation -
Simon - 27.08.2010
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!