[SUPPORT] Advanced Turn Based Tile Toolkit

@tamaster92: Yeah, that is a known error. That error is due to UE4, though, and not my toolkit, so I don’t think there is a way to prevent it from appearing. It is easily remedied, though. You just have to follow the errors to the event graph of the new unit, drag out new pins from the casts and set up each of the three animations again, which is done quickly. I go through these steps among other things in my sixth tutorial video (link to the relevant bit). That should do the trick :slight_smile:

wow, super fast response.

Thank you very much and I look forward to the upcoming updates

@tamaster92: Happy to help! The next update is coming along nicely, though there’s still quite a bit I want to add before it is ready.

@: That worked I guess I was not thinking about that since I want to see the grid when I am working in the editor to line things up. Oh and the decals was the rangetrace. However I have a different problem now. I can see that the units have a parent of unit_parent, and the unit_parent has a parent of pawn. I have set a collision box to overlap pawn and yet it does not trigger when the pawn walks into it. Is there something I have to set to the pawn gives overlap as pawn. If I use world objects I get in trouble with looping.

@Anzak: If you’re using the sample units included in the project, they do not have any collision activated by default. You must give them collision and make sure it blocks/overlaps the same channel as your trigger volume.

@: Yup got it and figured out my looping issue. This has really been an eye opener for me. Lots of learning on a very short time. Is there an event that is triggered at the end of a pawns turn that I can leverage or do I have to add that myself?

One more for you. When I enable collisions on the Pawn’s SkeletalMesh so it triggers overlap events the starting Tile of the actor seems to have an invisible box about the height of the actor. Even if I set no physical collision it still happens.

What do you mean when you say it seems to have? What is happening exactly?

The Pawn jumps up about 100 units when you first move it. Then after that any time it walks over the tile it started on it walks up and back down an invisible hill about 100 units high.

@Anzak: I’m guessing you set up the collision of the pawns to block PathTrace and RangeTrace. PathTrace is used to determine what tiles are walkable and their height when you use heightmap from tracing. When the toolkit traces for heightit collides with your pawns and think the tile is as high up as the pawn’s head. Set the collision of the pawns to ignore PathTrace and RangeTrace and it should work fine.

Yes path and rangetrace are turned on. However I can not turn them off.

Ok, I’m not home so I can check the exact wording, but you should be able to set collision presets to custom so that you can specify each channel. That’s a basic feature of UE4, so if you can’t find it do a quick googling :slight_smile:

I have it set to custom. When I click the check box to turn them off it does nothing.

I had it changed in the picture but I have Collision Enabled set to No Physical Collision. Does this have something to do with how the actor inherits from pawn?

Oh, I see. You can’t click them off. Set them to ignore.

That is what I am saying I can’t change them at all. That is why I am wondering if there is something that locks them due to inheritance.

@Anzak: I can change it just fine. Have you created a child component of any of the default tiles? It seems like it since it says “inherited”, even though the name is the same as the default one. In that case you cannot change collision as that’s set from the parent unit. Instead oduplicate any of the four sample units if you want to modify the skeletal mesh.

I deleted the actor and recreated and no issues. Well no issues with the actor. It seems like every time I get one thing working 2 more break but such is the learning process.

@Anzak: Ok, good thing you got your first problem sorted, at least :slight_smile: Can I help with your fresh issues?

@: I am sure you could I just do not want to waste too much of your time as I work through the learning process. I spent a good 4 hours playing around with a logic error that if I had been looking at the code would have been clear right away but because of how Blueprints work I was not able to understand the issue for a long time. Right now I do have and issue that as new floor areas spawn they are not walkable if I turned off the grid like we talked about earlier. the problem is solved by showing the grid. I also have a loop condition that happens when I enter a trigger box that points to an area that already exists. I have some logic for cleaning up those boxes. I need to get a bit more logic in there to clean up. For example if I go forward then take 3 rights I come back to the first area. When I move back into the first area the trigger box on the right is still there and causes a loop as it tries to build to the right which already exists. I am thinking an array where I keep track of things will help. However I can not use negative elements which is a problem. Mostly it is learning Unreal better and learning how your tool kits does some things. I am sure I will ask questions as I go and I will try to keep them to the tool kit as much as possible.

@Anzak: Indeed, figuring stuff out on your own is often the best way to learn. However, it seems like you’re trying to create levels procedurally; and in that case I should give you a nudge in the right direction to spare you some headache. If you use heightmap from tracing the toolkit generates an array containing the walkability of all tile edges at the start of the game by doing a line trace on all tile locations and checking if the PathTrace channel is blocked. If it is, the edges in the Edge Cost array are generally set to 1 (walkable). This is done in the Add Viewport Terrain To Arrays function, which is called at Event Begin Play in BP_GridManager. If you add new terrain to the level after this function has already run they will not be added to the array, and the toolkit does not know they exist as far as pathfinding is concerned. Make sure you add your procedural terrain before running this function.

If you want to get a deeper understanding of the toolkit I highly recommend that you watch my tutorial videos on YouTube. The fifth video in particular should give you a much better understanding of how all the blueprints work (it’s as much a reference as a tutorial, running for almost three hours). Here’s a link to my playlist, if you haven’t seen all of them yet.