Knockout manager bug?

I have a really weird bug with the knockout manager. It looks for a specific player to be knocked out using blocks. It then adjusts scores accordingly.


The first time it runs it works perfectly.

Every time after that it adds 1 to both teams’ scores instead of adding 1 from the team that knocked out and subtracting 1 from the team whose King got knocked out.

This behavior has been consistent on multiple tests. It has nothing to do with the Score property not liking negative numbers, it does it when I start each team with a score of 10 as well.

Nothing else touches the Score property. Nothing else triggers on knockouts apart from a random player on Team 1 being chosen as King.

If I take out the adding part then no scores are changed after the first knockout (but things that happen on channel “team1kingko” happen properly).

Why is the KO manager only setting properties properly the first time it’s triggered?

2 Likes

Does anything happen to the team1King property?

It gets changed to a random player on Team 1. The trigger continues to work properly (only triggered when the King gets knocked out and not the other player).

1 Like

Does anything other than that trigger get triggered by “team1kingko”?

A relay picks a random player on team 1 to be the king then this trigger happens

regicide issue5

1 Like

Could explain this a bit more for me? I don’t get what you’re saying…

If I leave in the “Set Property (as knocked out player)” to subtract points but take out the "Set Property"to add points then no scoring changes happen after the first trigger. The trigger is still activated (the activity feed item still happens) but scores are not changed.

So it works as intended when you knock the king out the first time but not the second time? After removing the blocks, of course.

The first time it does the “set property (as knocked out)” as expected (subtracts a point from the team whose king got knocked out) and the “set property” trigger as expected (the team who knocked the king out gets a point).

After the first time it only does the “set property” trigger, and it does it for both the knocked out player and the player who knocked them out. (both teams get a point)

If I remove the “set property” trigger to add a point the score only changes on the first knockout.

Oh wait this is going to be dumb. You need the temporary as knocked out player block for the set property as knocked out player block. Idk if that exists though.

Nevermind, I figured it out!

The knockout manager has a “set property as knocked out player” that needs to be there. The proper code looks like this:

No idea why it only worked as I wanted it to the first time, though.

1 Like

It’s because both scoped properties were the same.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.