AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Deathrun and Trap Kills (https://forums.alliedmods.net/showthread.php?t=245468)

NUdH3 08-02-2014 11:36

Deathrun and Trap Kills
 
Hey Guys,

i search a way to detect, which players are killed by a trap on a deathrun map from a terrorist. I like to give a point to that terrorist, who push the trap.

Mostly the attacker is the console/world or it's a self kill.

Is there a way? I've seen it already in the past on a server.

bat 08-02-2014 12:50

Re: Deathrun and Trap Kills
 
Hmm I like idea, I will be make it.

xf117 08-02-2014 14:50

Re: Deathrun and Trap Kills
 
All the damage comes from the world. The only thing you can check is the location of death and who pressed a button. Not very reliable and probably cannot be any better.

Mathias. 08-02-2014 19:46

Re: Deathrun and Trap Kills
 
Maybe you can get the entity that killed you even if it the world (look for triggers kill, closest entity, etc.) and it should contain the button activator entity and look either for the closest player or hook button press, make an history of who press which button and figure out the player ( don't take the last player because some trap don't instantly kill and it is possible that an other trap is trigger before it and you got confusion ). If you want to take a step further, block the damage from the world, track the player like I told you and if you found a valid trigger activator, make the activator do damage to the victim, if not found a valid activator (just fall in a hole without anything to be trigger) just ignore the block dmg or force it to suicide if it too late. It should not be noticeable (as a delay or lag) and you get the activator got score for doing his stuff.

It just a concept and I'm pretty sure that the game contain all the information needed to make it happen. If you want to take a step further, for trap that have sort of floor disappear to make player fall into a trigger kill you can make a loop on map start to check every movable obstacle and triggers and check the distance between each other (look if they are under a movable object) and create a relation between the two.

Sound painful since there is allot of different element and way to happen but you can grow it little by little and if there is some really unique case you will have to do a unique solution for certain trap (but im pretty sure that all above should take care of 99% of the traps)

thetwistedpanda 08-02-2014 22:13

Re: Deathrun and Trap Kills
 
I found it easier to assign any death from a runner to the button presser, but that was after ruling out the other possible reasons for that death. A few free kills awarded every now and then that shouldn't have been, but was never a big enough issue to deal with it. Essentially, if runner dies, check basics - was runner killed by another player, did runner die in spawn from spawn killer, did runner suicide, etc - afterwards the only reasons for death were typically from new traps or existing traps.


All times are GMT -4. The time now is 09:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.