Open farooqkz opened 1 year ago
Maybe one could get this using players current position but I don't think that is much reliable
Probably the safest option, worst case scenario you don't get the kill points
I think the best is requesting position of damager node from the core team.
I think the best is requesting position of damager node from the core team.
You have to make sure you can reliably track node removal/placement though
I think the best is requesting position of damager node from the core team.
You have to make sure you can reliably track node removal/placement though
We could add metadata to each spike on place
We could add metadata to each spike on place
That has nothing to do with storing the positions in a per-match table. I think I misunderstood what you meant by I think the best is requesting position of damager node from the core team.
I was thinking to storing placer name and team in the spike's node metadata and retrieve it using reason.node_pos
(once we have it) to punch the damagee on the behalf of placer.
Added the engine change needed
label in that case. Although there are less pretty workarounds that don't require an engine change
This is now possible in 5.8-dev, but the implementation should disable itself if the server version is too old
Please assign this to me.
Currently we have spikes in game which deal damage to the enemies and could even possibly kill them. In maps like The Tunnel spikes can improve base's defense so much. But no point is given to the player placing spikes as kill assists or kills.
Spikes do node damage:
https://github.com/MT-CTF/capturetheflag/blob/master/mods/ctf/ctf_map/ctf_traps.lua#L39
However this damage has no effect for the teammates:
https://github.com/MT-CTF/capturetheflag/blob/master/mods/ctf/ctf_map/ctf_traps.lua#L96
One way to implement this feature is saving placer's name in node's metadata and retrieving the metadata upon damage and via code, the placer could damage the enemy so that the mechanism of the game could later count kills or kill assists.
To get a node metadata one needs to get node's position and I haven't found a way to get node position through hp change callback. Maybe one could get this using players current position but I don't think that is much reliable.