![]() |
Showing blood effects only once
To check if a player has been hit:
PHP Code:
PHP Code:
|
You'll have to show us the script of the class "bloodfx" as well. :)
|
I'm pretty sure onActionProjectile is triggered (when clientside) when ever a projectile hits something, not just the client player. Check up info on projectiles on the wiki as well as check out the tokens in the params variable (while in the onActionProjectile block).
|
Sure. :)
PHP Code:
The next 3 are the blood effects.. The 7th param is the sound effect. All the params = index of sprite/sound. |
Quote:
|
Use showimgs, why putnpcs for blood effects?
|
Quote:
Why not set it as a player attr? |
if(actionprojectile2) is the one that triggers when it hits anything. Not just the player. That's why I am using a testplayer() to see if it the player or not.
@cbk1994: How would that work? PHP Code:
|
Quote:
|
Quote:
|
Quote:
would probably work. If not, showani( 1, "mybloodgani", player.x, player.y ); may. |
Woah, didn't know there a showani() command. Thanks i'll try it.
It automatically deletes itself after being played, right? |
Quote:
Might want to do this: PHP Code:
Here are the showani params. showani( index, x, y, direction, animation, params ); So something like PHP Code:
|
The scheduleevent doesn seem to work it keeps playing over and over again...
PHP Code:
THANKS MAN +rep osht cant.. |
Why do you use a combination of GS1 and GS2?
function onActionProjectile() Also, replace 'length' with the time ... |
onActionProjectile only detects when hit on player.
if(actionprojectile2) detects when it hits anything. |
Quote:
function onActionProjectile() = if (actionprojectile) function onActionProjectile2() = if(actionprojectile2) params[0] = #p(0) |
For params part, #p(0) is shorter than params[0].
About the projectile2 part, it didn't work for me, but now it does. Thanks. |
Quote:
It's ugly and makes little sense. |
Not to mention that if GS1 ever gets removed, your scripts will go BOOM.
|
Quote:
|
Quote:
|
I've also read on the Wiki, though I can't find it now, that you should avoid mixing GS1 and GS2.
|
Quote:
Besides that it's just weird and improper coding! |
Message codes for the win!
|
| All times are GMT +2. The time now is 11:05 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.