How to delete an actor BP with a specific variable value

I want to erase only blocks such as 2, 4, 8, 16 in the 2048 game by key input

All blocks are the same blueprint, numbers are variable


We still lack information on what exactly you are showing there. But, from the given check numbers you can see that as the number goes up, it actually results from self-multiplication. You can use this formula x = x^2 or simply x = x*x.

It will give the output of the next check numbers of your needs which then you can do the check. Another way is to use an array.

If this is not what you are looking for, then we will please to need more information about this question.

In this game blocks are simply cosmetic and the board array handles everything.

How do you have the board array setup?

Created based on this video

Guess he’s not using an array… IMO with traces you are going to hit a wall when moving the blocks since they need to be checked in order depending on what direction they are told to move.

You can check out this video: Coding Challenge #94: 2048 - Part 1 - YouTube ← even though it’s for Javascript, IMO he does a good job explaining his thought proccess.

You’ll need to know how to navigate a 2d array.

1 Like

Does it mean that in BP it is not possible to implement this operation?

Yes, it can be done exactly.


I don’t know how to call an actor with a specific variable