Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   onActionProjectile is too sensitive (https://forums.graalonline.com/forums/showthread.php?t=134267754)

Vatec 01-11-2013 01:59 AM

onActionProjectile is too sensitive
 
So I have been playing around with shoot and onActionProjectile on a modern server I have been working on and have noticed that onActionProjectile gets called if the bullet is very close to the player, why would it do this? This can be very annoying if the bullet doesn't actually hit you and you take damage.... What would be the best way to overcome this? I don't think there are coods from the projectile which are sent along with it???

Hezzy002 01-11-2013 03:03 AM

http://gscript.graal.net/onActionProjectile2

cbk1994 01-11-2013 06:02 AM

If it doesn't hit you on your screen, it shouldn't call onActionProjectile on your client. That stuff is all handled clientside.

DustyPorViva 01-11-2013 06:26 AM

Quote:

Originally Posted by cbk1994 (Post 1711959)
If it doesn't hit you on your screen, it shouldn't call onActionProjectile on your client. That stuff is all handled clientside.

I think he means the fact that projectiles have the collision box of a character(which is much larger than a bullet, I guess).

cbk1994 01-11-2013 07:33 AM

Quote:

Originally Posted by DustyPorViva (Post 1711960)
I think he means the fact that projectiles have the collision box of a character(which is much larger than a bullet, I guess).

I don't think that's true, though. You can fire projectiles through a 1 tile opening.

This is not the best demo video, but these custom projectiles I made a while back perfectly mimicked the default projectiles' collision patterns.


Crow 01-11-2013 08:15 AM

The hitbox of a projectile is defined by the graphics used in the gani of the projectile, I believe.

ffcmike 01-11-2013 08:14 PM

Iirc the dimensions of a projectile are 16 x 16 pixels.

I don't think onActionProjectile() is actually consistent with seeing the projectile hit your character's 32 x 32 pixel blocking area though, which is necessary for onActionProjectile2() to be invoked.


All times are GMT +2. The time now is 11:40 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.