Thread: Projectiles?
View Single Post
  #3  
Old 04-02-2010, 06:32 AM
Hellz Meteor Hellz Meteor is offline
Registered User
Join Date: May 2005
Posts: 3
Hellz Meteor is on a distinguished road
Quote:
Originally Posted by ffcmike View Post
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(param1param2etc){
  
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?
Reply With Quote