Skip to content

Spikes don't have perks for the placer(s) #1087

Open
@farooqkz

Description

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.

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions