How to have workshop check who died and who killed them

Title. Ive been wanting to make a gamemode where you kill someone and absorb their powers; for instance: you kill mercy and now you heal damage over time.
Can anyone help me?

this sounds like a big project, since you would need to manually create the effect of each power in a rule, and then when you kill a player you set a variable which lets you know which power to activate.
Another question to think about is if you want a player to be able to have more than one power activate at a time, which makes the method slightly different.

let’s take mercy as an example, with the method of having only one hero power at a time:

Rule 1 - Check which power to activate after elimination:
When the player gets an elimination, set player variable P to “hero of victim”
(this rule works for all heroes no matter who is eliminating who)

Rule 2 - activate mercy’s passive power after killing her
if player variable P is equal to Hero: Mercy, start healing over time

you might even need several rules for mercy, since her heal over time pauses for a moment while taking damage, but this is the basic idea of how to detect which hero power should be active. You’ll also need rules for de-activating the power if the player gets another one

If you want the player to be able to collect several abilities at a time, it becomes slightly more complicated, but let me know if that’s what you want to do and i can go over that as well

1 Like