Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-29-2007, 08:43 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
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)
{
  player.chat = temp.damageType;
}
Currently returns "0", however, wouldn't it be great if you could find out what called it?
Such as an explosion, the player being hit by a default projectile [arrow, bush, fireball etc].

Wouldn't it be cool, thanks!!
Reply With Quote
  #2  
Old 04-29-2007, 10:13 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Sounds interesting, could be nice for some classic servers :o
__________________
Reply With Quote
  #3  
Old 04-29-2007, 10:29 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
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)
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #4  
Old 05-03-2007, 06:24 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Totally.
Reply With Quote
  #5  
Old 05-03-2007, 09:03 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
You could script a custom like this, though it would be much easier to just have Stefan do all the work
Reply With Quote
  #6  
Old 05-04-2007, 03:30 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Gambet View Post
Stefan (...) work
Best not to say those two words in the same sentance.
__________________
Reply With Quote
  #7  
Old 05-04-2007, 10:26 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by cbkbud View Post
Best not to say those two words in the same sentance.
Yeah, as if Graal wasn't more then 1000 lines.

Graal client + server is at least 10-20 megabytes of files if not more.
__________________
- Zidane / Zidaya
Reply With Quote
  #8  
Old 05-03-2007, 09:14 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
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.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #9  
Old 05-03-2007, 10:42 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Tyhm View Post
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.


Do you think Stefan just presses a button and the command magically appears? He has to script it ya know x-x
Reply With Quote
  #10  
Old 05-04-2007, 07:48 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Quote:
Originally Posted by Gambet View Post
Do you think Stefan just presses a button and the command magically appears? He has to script it ya know x-x
I know, and he's overtaxed, he's working on too many projects at once and so we in the Red-Headed Stepchild department get significantly less Stefan's-Brain Time than, say, Graal3D.

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..."
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #11  
Old 05-03-2007, 10:16 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote
  #12  
Old 05-04-2007, 11:31 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Chandler View Post
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)
{
  player.chat = temp.damageType;
}
Currently returns "0", however, wouldn't it be great if you could find out what called it?
Such as an explosion, the player being hit by a default projectile [arrow, bush, fireball etc].

Wouldn't it be cool, thanks!!

I see how this could be useful! But you're the king of pfs .
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #13  
Old 05-05-2007, 08:48 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
I'm wondering what a PF is now
Reply With Quote
  #14  
Old 05-05-2007, 09:15 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I'd really like access to Object Types and to be able to make my own
__________________
Reply With Quote
  #15  
Old 04-17-2010, 04:47 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
bump!!
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:42 AM.


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