Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Simple comparison of scores for if and loops #26

Open
BrainStone opened this issue May 4, 2016 · 0 comments
Open

Simple comparison of scores for if and loops #26

BrainStone opened this issue May 4, 2016 · 0 comments

Comments

@BrainStone
Copy link
Contributor

Having simple comaprisons in conditions would be amazing!

Something like this:

if: selector1 score1 <= selector2 score2

would become

/scoreboard players operation selector1 score1 -= selector2 score2
/scoreboard players test selector1 score1 * 0
/scoreboard players operation selector1 score1 += selector2 score2

Then just apply the if logic to the second command.

Scoreboard-Test-Commands for all comparison operators:

<= -> * 0
< -> * -1
>= -> 0 *
> -> 1 *
== -> 0 0
!= use the == logic and invert the condition. (if: a b != c d becomes not if: a b == c d and vice versa)

@BrainStone BrainStone changed the title Simple comparison of scores for if and upcoming loops Simple comparison of scores for if and loops May 4, 2016
@Adrodoc Adrodoc added this to the v2.0 milestone Jun 4, 2016
@Adrodoc Adrodoc modified the milestone: v2.0 Mar 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants