This block doesn't work, could someone help me?

I tried this, and this doesn’t work. This code is to check an invalid move in 2048, so it doesn’t spawn a random number onto the board. is there another solution?


Edit: moved is a channel that does the random numbers

4 Likes

@getrithekd, could you help me?

Could you explain what you’re trying to do. Like how you got to this point and what all the x, y properties are

There HAS to be a better way to create the property Board Check 1.

2 Likes

Wait, is Board Check 2 the game board one move ago?

1 Like

Does everything else in your build work properly? If all else fails, you could look at the official 2048 code to see how it works.

3 Likes

the x, y properties are just coords of the numbers on the board. and let’s say on your board, you get to a point where you cannot go up, so then the number doesn’t spawn, since there is nowhere to go

1 Like

it’s suposed to be after, with getrithekd’s words: Store the data in 2 properties and only change one property. Check if they’re the same and then do the action if they aren’t and then set the one you didn’t change to the one that you did change.

1 Like

You could always use a trigger loop for less blocks I think.

fluffy

@VoidFluffy I pretty much left. Pretty much.
i havent edited the peoples list in forever lol

3 Likes

I think you forgot to add the part where you set the two to be equal to each other if they aren’t equal.

2 Likes

That’s only in the “else” part of the block though.

1 Like

the only way that else block is triggered is if the properties are = to each other, meaning, it should trigger when they are equal, or, am I somehow wrong?

i think what clicclac means is that this is separate from the if statements.

oh, I see

so, something like this?

1 Like

i think you can edit the second set property board check 1 block because when the code runs it will set the property at the start anyway.
try testing it

never mind, I realized that was not needed, so yeah, it is

???

I asked which set property block you meant, but then I realized that it was the last 3 blocks, I edited It, but I was too fast for it to be seen

and, now, a problem arises, for some reason, instead of adding 1 number, it adds 2, and I do not know At all why it’s hapening