![]() |
Request: onPlayerHurt()
Since all the default damage is done by this one thing, would it be possible to detect what called it?
HTML Code:
function onPlayerHurt(damageType)Such as an explosion, the player being hit by a default projectile [arrow, bush, fireball etc]. Wouldn't it be cool, thanks!! |
Sounds interesting, could be nice for some classic servers :o
|
Agreed.
Maybe even like the Java Main function, where there is an array of arguments which you may or may not use...like, hurt 0,32,32,0.314,Tyhm; for "By a bush, impact at 32,32, direction of travel was 0.314 radians, owned by #a=Tyhm". So your script ignores all the arguments you do not (for some reason I lost my apostrophe) need... (Totally wants to play jump&run now) |
Totally. :D
|
You could script a custom like this, though it would be much easier to just have Stefan do all the work :rolleyes:
|
It's ALWAYS easier to have Stefan do all the work. It's the only way anyone can be sure the fixes will be compatible two versions down the road, and as efficient as they can be; if we script something clever where the shrubbery last thrown set a local level-wide variable, and whoever or whatever got hit checks the local level-wide variable, what happens if somebody else throws a vase and hits someone else before the first one drops? What happens if vase2 lands after bush1? Do we set up an array of level-side strings? Do we then have to check each one to match up "Okay, the vase wouldn't have hit him all the way down there, so it must have been the shrubbery"?
Much more efficient if it's just In The Default. |
I think the problem is having to redo the whole hit system just to pass a few parameters.
... and I could of sworn I posted in here before... where did my post go. |
Quote:
Do you think Stefan just presses a button and the command magically appears? He has to script it ya know x-x |
Quote:
|
Quote:
But I stand by it. If he were to script the defaults in GScript, distribute them to every PW, and remove them from the EXE, we could handle these things on our own. "Playerhurt needs to pass more parameters? Okay, hm, let's open Stefan_DefaultDmg and search for triggeraction playerhurt..." "The Playerlist needs to stop showing people who've cast NinjaVanish to anyone but staff? Okay, hm, let's open Stefan_DefaultPL..." "Someone's using a movement trainer? Okay, let's open up Stefan_DefaultMovement..." |
Quote:
Graal client + server is at least 10-20 megabytes of files if not more. |
Quote:
I see how this could be useful! But you're the king of pfs ;). |
I'm wondering what a PF is now :(
|
I'd really like access to Object Types and to be able to make my own :(
|
bump!!
|
function onPlayerhurt(attacker,damageamount) {
} |
ois ty
no way to check explosion or thrown object :S |
Quote:
|
Ok added power, hittype [, player] as parameters, it's on clientside though so you will need to wait for v6 being released.
|
Quote:
|
yay you rock!! :)
|
| All times are GMT +2. The time now is 02:28 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.