tell when player gotkill?

Post your scripting questions / solutions here

Moderator: Moderators

Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

tell when player gotkill?

Post by Elgan »

has any1 found a good way of detecting when a player gets a kill?, using script i mean.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

I see you didn't give up on this? ;)

Well, gotkill is a player class event. Theoretically, waittill should wait for an event of the given name, but it can't seem to recognize gotkill as an event. :? It's a dead end I think.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

just been lay in bed thinkin and maybe a combination of things cud do it?

* triggers setting who shot last
* when dead loop to sdee who is looking at the player and if more then one is then chech agaisnt who shot last.
* for nades maybe time them from ppl chucking themn. then if u died at 900 go bk 3 level seconds and see who chucked a nade at 8.98.

or maybe just the trigger thing:(.
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post by Deutsche Dogge »

Maybe this has been tried but, i've been away for a while and missed many discussions, has this method been tested?

- loop each player;
- $player[local.variable].gotkill setthread yourkillcounterthread

Maybe waittill can't be used with player because it's waiting (blocking), but using this sets the called method if the event occur (like delegates in C#) which would be the best approach imo. But if the event isn't even fired or has an empty body (programmer had no time to add the code maybe) then as Rookie said, there's no way to know and it's a dead end.

Throwing another idea, if a killed player knows who killed him (MOD message variables filled with names), couldn't this be used to implement something? Or is it internal to the engine too?
Image
Click sig to visit the alternation modding community
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

gotkill is not a event for class player only actor.

the messages sayign who killed who are internal.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Elgan, why are you still trying to impair my authority! :evil: It is a player class event!

;) :P

To be specific, the kill messages are handled by the game library, the source of which I'd be really eager to get.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

Rookie One.pl {sfx} wrote:Elgan, why are you still trying to impair my authority! :evil: It is a player class event!

;) :P

To be specific, the kill messages are handled by the game library, the source of which I'd be really eager to get.
lol., it dont matter if it dont work for player though!..well it does:'( but it dont matter what gotkill is for if its friggin usless
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

It does work, it's just used internally by the game library. It wasn't intended for usage with scripts.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

so its still frigging usless init!
mefy
Corporal
Posts: 33
Joined: Tue Oct 21, 2003 2:57 am

Post by mefy »

It would be nice to have a list of events that you could actually use. Every time I try to use one I get an "invalid waittill" error :(
New Gametypes for Medal of Honor
Capture-The-Flag | Freeze-Tag | Demolition
www.planetmedalofhonor.com/mefy
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

slider_v reacons his trigger meathod works %100. ive never tried it, but might some time.

has any1 tried using trigs?
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

It would be nice to have a list of events that you could actually use. Every time I try to use one I get an "invalid waittill" error

Code: Select all

death
movedone
animdone
prespawn
spawn
saydone
those are (almost guaranteed) the only ones you'll use.

EDITED to include saydone
Last edited by lizardkid on Mon Apr 25, 2005 12:37 am, edited 1 time in total.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

+ saydone.

@Elgan - it won't work 100%, as bullet collision detection is model mesh-based, not bounding box or hitbox based one.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

Rookie One.pl {sfx} wrote:+ saydone.

@Elgan - it won't work 100%, as bullet collision detection is model mesh-based, not bounding box or hitbox based one.
ive never botherd trying it cos for ever way i can think of to make it accurate i can think of 2 reasons it wud be inacurate.

slider says his is excellent http://www.modtheater.com/forum/thread24226.html

maybe ill try it see how accurate it can be made.

if only u cud detect where the trig was hit:(. if only gotkill worked.
User avatar
oddball
Corporal
Posts: 44
Joined: Tue May 27, 2003 3:49 pm
Contact:

Post by oddball »

bit late answer, but i think you should put a waittill dead on the opposite player and then see by which player it was killed..
just and idea..
[VS-UK]Maj.OddBall[BnHQ]
Post Reply