Page 1 of 2

tell when player gotkill?

Posted: Sun Apr 10, 2005 12:37 am
by Elgan
has any1 found a good way of detecting when a player gets a kill?, using script i mean.

Posted: Sun Apr 10, 2005 7:53 am
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.

Posted: Sun Apr 10, 2005 12:37 pm
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:(.

Posted: Sun Apr 10, 2005 12:38 pm
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?

Posted: Sun Apr 10, 2005 12:49 pm
by Elgan
gotkill is not a event for class player only actor.

the messages sayign who killed who are internal.

Posted: Sun Apr 10, 2005 4:01 pm
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.

Posted: Sun Apr 10, 2005 4:13 pm
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

Posted: Sun Apr 10, 2005 4:27 pm
by Rookie One.pl
It does work, it's just used internally by the game library. It wasn't intended for usage with scripts.

Posted: Sun Apr 10, 2005 4:29 pm
by Elgan
so its still frigging usless init!

Posted: Tue Apr 12, 2005 12:52 am
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 :(

Posted: Tue Apr 12, 2005 1:17 am
by Elgan
slider_v reacons his trigger meathod works %100. ive never tried it, but might some time.

has any1 tried using trigs?

Posted: Tue Apr 12, 2005 6:40 am
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

Posted: Tue Apr 12, 2005 12:42 pm
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.

Posted: Tue Apr 12, 2005 12:52 pm
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.

Posted: Sun Apr 24, 2005 9:27 pm
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..