Quote:
Originally Posted by ffcmike
While on an advanced level there is the issue of the detection being serverside or clientside among other things such as abstracting all projectile landing occurrences into a single system, the simplest way to do this would be to have the following code within a weapon:
PHP Code:
//#CLIENTSIDE
function onActionProjectile(param1, param2, etc){
player.chat = "Im hit!";
}
Parameters being what was set before the projectile was shot via setshootparams.
I don't think Clientside onActionProjectile is either accurate or synced with the serverside version of the function however, on Classic I use custom detection on the onActionProjectile2(x, y, params) event which occurs whenever a projectile hits anything and not just your player.
|
I don't think I will need it to be super accurate at the moment, just looking for a basic function that I could test, which you answered.
So if I call the onActionProjectile function, it affects the player that the projectile hits, not the player who shot it, correct?