PDA

View Full Version : Custom Damage System


excaliber7388
08-21-2006, 05:12 AM
So anyway, DR will now be more of an rpg server, and I'm gonna need a way to damage a player without hurt, hitplayer, etc.
I was thinking an action that is triggered when the damage is needed to be done, and where, and received by a system NPC that the other guy has, which would cause the damage. When the custom hp variable hits zero, the players hearts are set to zero, and dead.
So, would this work, is there a better way? Or am I completely off track?
hmm?

Angel_Light
08-21-2006, 10:32 PM
umm you could completely script the player dieing aswell,

function onTimeOut() {
if (clientr.hp--) { //not sure about this
freezeplayer(1);
setani("hurt",NULL);
}
if (clientr.hp == "0") {
freezeplayer(1.2);
setani("dead",NULL);
}
}

excaliber7388
08-21-2006, 10:34 PM
This seems to work (although using a similar system for attacking baddies doesn't work, see my other thread on that: http://forums.graalonline.com/forums/showthread.php?p=1211986#post1211986).
I was wondering if there was a better way to do this though.

ZeekTheMan2
08-23-2006, 02:53 AM
have you tried using function onActionprojectile(){