PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Add score changes on dynamic filters

Open OhPointFive opened this issue 3 years ago • 3 comments
trafficstars

This allows changing scores based on dynamic filters for teams like so:

<score>
    <on team="some-team-filter" score="2"/>
</score>

and for the team a player belongs to like so:

<score>
    <on player="some-player-filter" score="5"/>
</score>

I'm not too familiar with the naming conventions so I imagine my choices will not be the best. Let me know if they should be renamed.

Also, I did this rather on a whim, so I didn't realize it might make more sense as part of #1016. I thought I'd submit this just in case we want it in the score module too.

OhPointFive avatar Jul 05 '22 05:07 OhPointFive

I believe this one should be part of action/triggers, should be an action that can run in the context of either a player or a team. You can use q scope optional arg or derive it from context, similar in concept to how scope-switch gets its outer

Pablete1234 avatar Jul 05 '22 08:07 Pablete1234

I agree with Pablo here — I'm not sure if I'm supposed to close this myself or wait for someone else to look at it.

OhPointFive avatar Jul 08 '22 18:07 OhPointFive

@OhPointFive Actions and triggers have been merged, so you can rebase this branch and change it to use it.

Electroid avatar Jul 09 '22 15:07 Electroid

On-top of actions and triggers, variables were also merged.

See my comment on #1047 about how i think this could be implemented in a more flexible way that allows arbitrary score calculations. I'm going to close this as it's been stale for a couple months, feel free to open a new PR using actions & variables, or ask how to go about it if you want to take on it yourself.

Pablete1234 avatar Sep 12 '22 20:09 Pablete1234