Blockcode help [giving out points]

So, I am making a system where only the 1st player gets points [given out every 0.1 seconds]

1st a lifecycle for game start is run.
Then, a relay off all players is run.

Then these blocks are run:

Also, a trigger loop is run on all players (also on game start)
Trigger code:


Separate code on same trigger loop:

Coordinate Device Code:

Pls help!

You’re setting the greatest height to -999. The current greatest will always register as 6.

1 Like

?
What if number 1 is higher than 6?

What do you mean? You are setting the variable you are checking to -999. The first action doesn’t stop the others from being true, so all of them return true. This sets the greatest height as 6 finally, before setting the currentGreatest as that value, 6.

1 Like

In the first if it sets it to property 1 if higher. Same with 2, 3, 4…

Hmm…
Let me see what I can figure out.
:thinking:

So is it like not working?

Some things to troubleshoot with.
Are you assigning the player id’s correctly?

Is the properties 1,2,3,4,5,6 working?
Try a basic system with 2 people, then add more. Tackling a problem with 6 people is a bit harder

Not if higher. If lower. You have less than or equal to blocks.

1 Like

That’s good. I want it to be so if it is higher, you get a point.

Now I’m confused. Which one is supposed to be higher, the properties, or the variable? If the former, it would still trigger all because of the equal part of the check. If I’m on the same thought as you now, that’s what’s causing your problem. Try with just less than blocks.

1 Like

The purpose is to find the highest player in height, and then give them points.

Ok, but how exactly is this system doing that?
If you want I can just make an entire system for that, but it might take a while.

1 Like

Its always checking if your height is above -999. Of course it is, so player 6 is always first since it is checked last.

2 Likes