Unreal Match 3 Grid Update Help!

Hi Novakin,

Just want to check how things are going. Is everything working better now? Can I provide any additional help?

Still Struggling on the same thing. I might start it all over again, maybe I did something wrong along the way. Maybe I will try to solve this in a different way, not using radial damage. The radial damage causes domino effect of problems :smiley: ! I will update you, Thank you for all the help !

Hello! I’m sorry to be asking you this in this post but I can’t seem to find any information. I would like to download the Unreal Match 3 project but I can’t find it anywhere (I’m probably not looking in the right places either, I just started using UE4 a few days ago). I would be greatly appreciative if you could guide me in the right direction! Thank you!

Hi ABM86,

Just as a reminder, your comment is really a separate question, and you should open a question for it so others can find it easier.

However, to answer your question, it should be available in the Epic Games Launcher. Specifically, I find it in the “Unreal Engine” tab, under the “Learn” section. I see several headers in that section, starting with “Begin Your Journey”. The 5th header I see is “Example Game Projects”, and the first item in that header is “Unreal Match 3”.

You should be able to click that item to get more details and then use the button near the upper-right of the details page (“Free” at first I think, and then “Download”) to actually download it. Once that’s done, you should be able to use the “Create Project” button that appears there to create a project in your engine version of choice. An alternative project creation method is to find the “Unreal Match 3” item in your “Library” section (in the “Vault” header) and click the corresponding “Create Project” button.

Let me know if this helps. I’m happy to provide images if it would help.

Hi Novakin,

I thought I’d responded to your last comment earlier, but realized last night that I had not. My aplogies!

I remember when I first looked at this question, I thought of an alternate implementation that should fit better with the existing code. It does require a little C++ work though and didn’t answer your initial question.

In short, the thought was to modify the AGrid::ExecuteMatch(…) function to perform the equivalent of applying damage to your static blocks (e.g. decrementing an “adjacent matches” count on each block) and to check if they should be removed. That way, the static blocks can be added to the matched tiles before the match is actually executed. This should also have the benefit that removal of, respawning, etc. the static blocks is handled just like removing any other tile.

I can provide example code if you’d like to try that.

In any case, I’d love to hear how this is going for you and to help more if I can. Please let me know. :slight_smile:

Hi ,

Thanks for the interest, I would like some example code because I Am nowhere with the problem, whatever I try, I got the same result.

Thanks !

Certainly!

One solution would be to add a “can take damage” flag and “health” value to the tile abilities, and use those to emulate applying damage to the static blocks.

To do that, I added a couple lines to the FTileAbilities struct in Tile.h. The modified structure is attached in a zipped .h file.
Modified FTileAbilities struct

The interesting part was in AGrid::ExecuteMatch(…) in Grid.cpp. That was a little more involved though, so I’ve attached it (in a zipped .cpp file) instead of putting it inline.
Modified AGrid::ExecuteMatch(…) code

On matches (other than ones due to bombs), it checks around each tile in the match to find tiles that can take damage. It then applies a little damage to each, and adds any that drop below 1 health to the match.

The original matching code then takes over to destroy all the tiles in the match (including the newly added static blocks that were destroyed) and respawn them appropriately.

If you want to change the area around matches that damage the static blocks, you can change the value of the DamageDistance variable (on line 13 of the attached code). You could even replace it with different values based on the move type and/or type of tile(s) being matched.

Similarly, the damage can be changed using the DamageFromMatch variable (on line 45).

Note that the damage radius is currently set to 2 tiles, which I think may be more than you were using.

As usual, please let me if this helps, if anything is unclear, or if there is additional information (or help) I can provide.

,

Yeah I’m sorry about that, was just a little desperate to find this and resorted to asking here, my apologies. Thank you for the prompt reply, your guidance was great! Thanks again!