Overlay Text Updating Help

I’m making a guide for getting a bonus every elimination you get, kinda like brawl stars, and had some ideas for extra things to add to the guide. I had the elimination bonus part down but one of the extra parts to the guide was an overlay that shows the bonus the player is getting. I almost had the system down but when I tested it, the overlay only updated after you hit the player, therefore, showing the wrong amount.
Here is what I have so far:

This probably isn’t the most efficient way to do this…
Also property “bonus” is tied to the tier of the amount of damage bonus you get.

1 Like

Yes, this Is the most efficient method. :slight_smile:

1 Like

For the set m to [number] part, you can simplify it to

set m = ((get ('bonus')) * 25)

for the not updating part, you could make it run every second unless there is a randomizer for the bonus property

3 Likes

Thx! I think that’s concatenation but whatever it is, I’m not really good at like organization and stuff so again thanks! A trigger is triggered for a certain player that gets a knock out. This trigger is what updates the overlay. Does that help info-wise?

Yes it does, thank you. Would this work?

When the player gets a knockout, it starts a trigger-loop. The trigger which the trigger loop runs on also has the block-code above.

I could try! I was trying to make the most memory efficient but if that’s what it takes! Tysm! :smile:

What do you mean by this:

which block code? yours or the one in the topic post?

use the if, else if: do, else if: do… block, instead of using if do, if do, if do

was about to say that then saw your post

Try making the channel transmit from “when property value changes, transmit on” instead of the ko manager so that the overlay only changes after the “bonus” property changes. (This will make it more accurate to change from outside the ko manager)
It should be here if you scroll down in the property’s settings:


*might want to test this before trying it.

1 Like

Set m to 4 times “bonus”

2 Likes

Why 4 times?

No like bonus multiplied by 4. Check it for the values in the if statement, and you’ll see.

2 Likes

It doesn’t matter

1 Like

how would a trigger loop help? sorry for the late reply @max1

when I tried using a trigger loop it just broke the overlay

The trigger loop would make the overlay update every second. Did you add a delay?

1 Like

since m is based on the “bonus” property it doesn’t work. the trigger that updates the bonus property would constantly update the bonus property which would mess up the overlay.

could someone test out this system so I can see if it’s a bug?:
trigger(when triggered it broadcasts on channel upd) (just use player collision) w/ block code:
Screenshot 2024-05-06 15.00.57
and an overlay w/ block code (receiving on channel upd):
Screenshot 2024-05-06 15.02.58

You will need a property called “bonus” with a default val of 0 and the type is num.

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