[SUPPORT] Advanced Turn Based Tile Toolkit

Sorry about the late answer, people. Yesterday got really busy. I’ll get to your questions now :slight_smile:

[quote=“, post:3471, topic:21930”]

Ok, here is a hardcoded example to give you a starting point. This creates tiles and add them to the grid in a hexagonal donut at a specified grid index:

https://i.imgur.com/i04elB8.png

https://i.imgur.com/N5jOGpp.gif

Note that DefaultTile does not have collision, so you would want to add your own mesh instance with collision that blocks PathTrace

Ah, sorry. I assumed you were using meshes. For decals, change the value of TileMarkersDecal (and for BP_Ability_MoveAttack also TileMarkerMoveDecal). Both are variables in BP_Ability and its children.

Yeah, this is my mistake. Seems like the material is being unnecessarily overridden due to an old setup that is no longer needed. Go to the DisplaySplineWithSplineMeshes function in BP_GridManager and remove the SetMaterial node.

AI is a bit more complicated. Generally AI abilities try to find all reachable tiles, with a move range defined by the PossibleMove variable in the ability. If the unit has only enough AP left when assessing an ability to use the ability, but nothing more, PossibleMove is set to 0 (in UpdateAttributes) and the unit will only use the skill if it can do so from its current position.

That error indicates that there is no value stored in the float array of the action. You need to pass the damage into the QueueAction(death) macro where it is called.

Maybe you forgot to connect the ForLoop to the Add node in BP_Ability_Move when you deleted the branch? Check your code and make sure it looks like my screenshots.

Many different ways to do this. Not sure which is best. Perhaps create a grid TMap that holds the number of units on each tile and when a unit wants to enter a tile, check the number, reference it against an array of predefined relative locations and make this the end point of the path? Something like that.

Hi Munchydo, that is a very common mistake people make with the toolkit, and understandably so, since the game logic/action system distinction takes some getting used to (check out my tutorials on the action system if you have not done so already). I’m making some changes in the next update that will make it more difficult to make these sorts of mistake.

The problem is that you are damaging and killing the unit in the game logic, but you are not sending this information to the action system, which asynchronously displays this to the player. So in other words you need to make sure that any time you deal damage you also queue and action to display that damage being dealt. Infest has been kind to show one way of doing this. If you are using the TakeDamage directly you can also set the AutoAnimate boolean to true, which will automatically queue the appropriate hurt animation and health bar change dependent on the input damage.