Is there a way to keep up with the longest STREAK? (highest number recorded)?
I have a lap running game where the players try to run laps without getting zapped by Sentries.
When they do get zapped, their lap count gets reset to zero. (and they start again)
I have a counter counting their most recent attempt.
I even have a counter counting their total laps.
Next, I would like to have a counter (or some kind of text) showing their LONGEST streak of laps without getting zapped.
So, if they ran 5 laps, then 7, then 2, then 4.
Their scoreboard would look like this:
RECENT: 4 laps
TOTAL: 18 laps
RECORD: 7 laps
The winner of the game is the one with the record streak, so this would have to transfer over to the end of game score.
Make a counter for the record that doesnât reset when the player is killed. You can use a trigger so that it only updates if RECENT is greater than RECORD.
Use two properties, one tracks the recent laps and one tracks the record laps. They are both number properties. When the record counter see that the property for the recent one is greater than itself, it will update to that property.
Sorry to need so much help here, but I just cannot figure out how to create a property that will show me the RECORD streak. How do I get a property to constantly look at the CURRENT number of laps and only change when its own number is passed.
How do I configure the blocks so that I get the RECORD number?
I just cannot wrap my head around the process of having a trigger or counter or property that will âholdâ the RECORD number.
thanks to everyone who has chimed in on this so far.
The counters update the number properties. The counter for the record only updates the record property if the recent property is higher than the record.
This is to create the property. Make sure that the property type is set to âNumberâ and transmits on whatever channel the counter uses when updated.
So basically, the trigger watches over RECORD and RECENT, comparing them to each other. When it sees the RECENT is higher than RECORD, it sets RECORD to RECENTâs value. This way, RECORD will never decrease, since it only updates RECORD when RECENTâs value is greater. This is why RECORD doesnât go back to 0 when RECENT does.