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 03-10-2006, 02:29 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
function onPlayerKills()

I can't find my other thread for this and I can't find it with surch so... w/e. Stefan should really incorporate this command into GS2.


onPlayerKills(specific account/npc id)

I know it would help with pking systems. Stefan if you read this. Please make this command. :'(
__________________
Deep into the Darkness peering...
Reply With Quote
  #2  
Old 03-10-2006, 03:45 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
For the default hitpoint system ?
Reply With Quote
  #3  
Old 03-10-2006, 08:54 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Well, I would say it would be extremely useful if custom hit systems could use this without lagging the server to death.

Perhaps there could be objectarray.trigger() that could somehow get rid of all the lag created by using a for loop?
like npcs.trigger("PlayerDied",obj_attacker) or npcs.trigger("PlayerKills",obj_deadplayer)
or player.weapons.trigger("Blah",null);

or
temp.triggerthese = findareanpcs(player.x-player.x%64,player.y-player.y%64,64,64);
temp.triggerthese.trigger("PlayerDied",attacker);
Reply With Quote
  #4  
Old 03-11-2006, 03:17 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
uh, if you had a custom hit system, you could just send a 'playerkills' message back to the player who killed the one who died. The only thing this would be neat to have in would be the default HP system.

I don't see why you'd really want to alert everyone in the level that someone killed someone else?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #5  
Old 03-11-2006, 03:31 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by ApothiX
uh, if you had a custom hit system, you could just send a 'playerkills' message back to the player who killed the one who died. The only thing this would be neat to have in would be the default HP system.

I don't see why you'd really want to alert everyone in the level that someone killed someone else?
Alert everyone in the level???
I mean, the NPCs in the level. Could be used for tracking the amount of kills from a certain time outside of the damage system.

Do you have any idea how to make a custom hit system?
Reply With Quote
  #6  
Old 03-13-2006, 05:46 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
yea jake understands what I'm saying. I mean something like this

if (playerkills) {
player.ap ++;
}

please pardon the GS1 but you undertsnad hopefully
__________________
Deep into the Darkness peering...
Reply With Quote
  #7  
Old 03-13-2006, 11:22 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Stefan
For the default hitpoint system ?
It looks like that's what he's suggesting.

I like what jake is saying.

onPlayerKills(obj)
onPlayerDied(obj)

Where obj is a reference to the attacker.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #8  
Old 03-13-2006, 02:42 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by napo_p2p
It looks like that's what he's suggesting.

I like what jake is saying.

onPlayerKills(obj)
onPlayerDied(obj)

Where obj is a reference to the attacker.
For Kills, obj should refer to the victim. For Died, obj should refer to the attacker.
__________________
Liek omigosh.

Reply With Quote
  #9  
Old 03-13-2006, 06:47 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Ajira
For Kills, obj should refer to the victim. For Died, obj should refer to the attacker.
Or even better yet, onPlayerKills(attacker, victim) or so.
__________________
Skyld
Reply With Quote
  #10  
Old 03-13-2006, 09:26 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Skyld
Or even better yet, onPlayerKills(attacker, victim) or so.
but player would already be assigned to the attacker object so it would be overkill.
Reply With Quote
  #11  
Old 03-13-2006, 09:32 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Ajira
For Kills, obj should refer to the victim. For Died, obj should refer to the attacker.
Heh, yeah that's what I wanted to say, but didn't.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #12  
Old 03-14-2006, 04:41 PM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
I think this has been proposed for a long time, but is there really a need for it? I thought pretty much every server was doing some kind of a custom hit system now?
__________________
Who has time for life these days?
Reply With Quote
  #13  
Old 03-14-2006, 05:14 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by jake13jake
but player would already be assigned to the attacker object so it would be overkill.
You just said you wanted all NPCs in the level to be alerted. So obviously it wouldn't be the 'player' object if an NPC is reading it.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #14  
Old 03-14-2006, 10:26 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by ApothiX
You just said you wanted all NPCs in the level to be alerted. So obviously it wouldn't be the 'player' object if an NPC is reading it.
The 'player' object would be implied because the player killing is calling the event. If it were playerdies, then the player dying would be calling the event.
Reply With Quote
  #15  
Old 03-17-2006, 01:13 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally Posted by jake13jake
The 'player' object would be implied because the player killing is calling the event. If it were playerdies, then the player dying would be calling the event.
That really doesn't seem to make much sense. You're going to have an NPC in a level that reads onPlayerKills(player)? I'm not sure you're getting the concept of all of this object orientation, onPlayerKills(player) would be a member of what object? If you're wanting to do that, whenever a player is hit you can store the attacker in a string, and if that player dies then trigger to an NPC to calculate it. Otherwise I'm really not seeing the merit of it.
__________________
Who has time for life these days?
Reply With Quote
  #16  
Old 03-17-2006, 02:28 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Projectshifter
That really doesn't seem to make much sense. You're going to have an NPC in a level that reads onPlayerKills(player)? I'm not sure you're getting the concept of all of this object orientation, onPlayerKills(player) would be a member of what object? If you're wanting to do that, whenever a player is hit you can store the attacker in a string, and if that player dies then trigger to an NPC to calculate it. Otherwise I'm really not seeing the merit of it.
Okay. You let me try to explain.


The "created" event handler doesn't imply a player object assignment:
PHP Code:
function onCreated() {
  
player.chat "blahdeedaregarfg"//doesn't work because no player was involved in the creating

On the other hand, the "playerenters" event handler does imply a player object assignment:
PHP Code:
function onPlayerEnters() {
  
player.chat "blahdeedaregarfg"//works because the player was involved in the entering

It would make sense for the player that was killing to be assigned to the player object of the event handler for "playerkills." However, it would also make sense to know who was killed, so it would make sense for params[0] to contain the player who died's object reference.

In clientside scripting the player object assignment is always assigned to the only clientside player.
Reply With Quote
  #17  
Old 03-17-2006, 11:06 AM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
I support Mr.Jake's ideas.
__________________
Reply With Quote
  #18  
Old 01-29-2010, 06:36 AM
Gamerkid7 Gamerkid7 is offline
Registered User
Join Date: May 2006
Posts: 10
Gamerkid7 is an unknown quantity at this point
I would really really like to see this functionality added

I've been having a hassle of a time trying to figure out how to determine when a player kills another player with the default hit system, and this would make things so much easier
Reply With Quote
  #19  
Old 01-29-2010, 06:59 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
...you just revived a 4 year old thread.
Good God, man, look at the timestamps before replying.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #20  
Old 01-29-2010, 02:12 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by coreys View Post
...you just revived a 4 year old thread.
Good God, man, look at the timestamps before replying.
There's nothing wrong with reviving a perfectly good suggestion, which I've needed plenty of times, that has not been added yet.
Reply With Quote
  #21  
Old 01-29-2010, 03:40 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Hmmm could be interesting especially since we are using the classic hitpoint system on iPhone
Reply With Quote
  #22  
Old 01-29-2010, 04:06 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by Stefan View Post
Hmmm could be interesting especially since we are using the classic hitpoint system on iPhone
It'd also be helpful on Final Star so that I don't have to use a work around, since it's needed for the Kills Leaderboard.
Reply With Quote
  #23  
Old 01-29-2010, 04:11 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
This is a little disappointing
This feature and many others for default have been begged for, for so so long... tracking kills, tracking hits, fixed bombs and arrows, and it only gets a higher priority/interest since iPhone uses it?

Meh, least it's getting done I guess.
Reply With Quote
  #24  
Old 01-29-2010, 05:37 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok with the next update of gserver and npcserver there should be a onPlayerKilled(victim,killer).
Reply With Quote
  #25  
Old 01-29-2010, 05:47 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by Stefan View Post
Ok with the next update of gserver and npcserver there should be a onPlayerKilled(victim,killer).
Niiiice.
Reply With Quote
  #26  
Old 01-29-2010, 05:57 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
What about a way to detect the last person to hurt the player via default hits(sword, arrows, bombs)?

player.lasthitby? It would actually make the new function for detecting who killed the player fairly redundant.
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 01:02 AM.


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