Comparing Properties

Well, this is comparing properties. There’s a few methods for different cases, but it should work for each one.

Properties of Different Scope

Say you have a score property, and you want to see who is in first place. This is a pretty simple concept, but it can get a bit ugly. Basically, we first have a property that stores the highest score yet. Then, we loop through the entire server to see if the person has a higher score than the highest score yet. If it is higher, then we set the player id of the highest score to the player’s id, and the highest score to that player’s score. And that’s it! I’m a bit lazy, so I’ll just copy the part from my voting guide that uses this:

This will now check the votes and teleport the voted player to the execution chamber. If there is a tie, no one will die. That rhymes!

Property Time!

Make a global scoped number property named “Num Votes”. The default should be 0. Make another global scoped number property named “Guilty ID”. The default doesn’t matter. Make a global scoped True/False property named “Tie”. The default should be False. Make a global scoped number property named “Num Votes Counted”. The default should be 0.

Make a trigger receive on “End Vote”. Put these blocks in:

Multiple Different Properties

WIP

Feel free to add your own methods or make mine more efficient!

Wooow yall get into the most interesting stuff! Good job on this guide!

2 Likes

Nice! Another good in-depth Getrithekd guide!

Could you add how to compare the same property to itself, but for two different people?

That’s what’s there.

1 Like

bump