![]() |
A tip for you all
Instead of using real hardcoded death in your health systems, use the following in your timeout:
if(playerhearts<playerfullhearts){ playerhearts=playerfullhearts; hitpoints--; if(hitpoints<1){ disabledefmovement; setani dead; sleep 5; setani idle; enabledefmovement; } } |
Using variables for such things wouldn't work, since those aren't stored after the player has logged off of the server.
And if (playerhurt) is more effective then playerhearts<playerfullhearts. |
hmm, another thing wrong with that script, it would hurt the player the same if the pker was using a sword or an axe.
you'd have to do something along the lines of NPC Code: that should work, but a lot of the time its more efficient if you have things like that in a timeout loop. |
Oh...yeah, but the exact script wasn't my point. My point was that using disabledefmovement and setani make death work better.
|
It is possible to make something like that but why wouldnt you just use the hard coded flags?
|
| All times are GMT +2. The time now is 11:23 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.