[SUPPORT] Advanced Turn Based Tile Toolkit

THankyou vary much

i have a map and map with battle andi can load a batlemap. i want to load another level if i win andreloadlevel if lose. 2021-04-26 01-20-14.mkv - Google Drive

Iā€™m really sorry my poor English brings you trouble. Therefore I have made an Image.
In this Image we can see the BP_Action_Move is spawned before the variable MoveTarget is added to the array MovePath. The BP_Action_Move should be added to the action queue and be executed immediately if there is nothing blocking it.
I guess the key to the question is the inner working of the UnrealEngine itself. During a single tick the current Function (SimulateMove) is a high priority and any other functions or events are not executed until this current whole function is completely executed. Itā€™s just a guess.

the system work on old version can i just copy to new

In the GameOver action you can add a new string variable. You can use this variable to set the name of the map you want to load.

Ok, I think I understand the question now. As you probably know, all code is executed in sequence (unless you use multithreading, which ATBTT does not). The QueueOrExtendMoveAction function is nested within a loop in the SimulateMove function. Once SimulateMove has started no code outside of that function will be executed until it is finished (including beginning new actions). So all the Move Target values will always be added to the action before it starts playing.

Unfortunately not. I have changed a lot in the toolkit since I made that video, so the old code will not be compatible with the old version. However, if you follow the steps I gave you above you can achieve the same result.

canyou give some info for cheanging. cant found this value.

You will need to override values that are inherited from the parent blueprint. To do so, click the eye icon in the variable list and check ā€œShow Inherited Variablesā€

image

![2021-04-28 20_28_45-BP_Ability_MoveAttack|493x260]2021-04-28 20_30_08-BP_Ability_MoveAttack

Sorry, did not remember the name correctly. What you are looking for is the MoveCostType variable

Hey, so for the first problem (movement cost) make sure to set PathfindingCost in the ability you are using (BP_Ability_MoveAttack) to FromPathfindingCost. If not all movement distances cost 1 AP. Also, when you use BP_Ability_MoveAttack the last action point is always reserved for attacking, which is why you are seeing one less movement than expected. You can switch to BP_Ability_Move or modify BP_Ability_MoveAttack.

Hi, youā€™re just quoting my earlier comment there? I donā€™t see any question. But yes, that is the post I was referring to. I misremembered the variable name when I worte it, so you should look for MoveCostType and not PathfindingCost

Thank you

Thank you

can you add more data how correctly to check?

is on puppets, BP_unit or anim ?

Hi,Thank you for answering my questions. And there is a Bug Report and new question.
The Bug is in the BP_Path_PassThroughFriendly. You overrided the function RunPathFinding, but I think the function RunPathFindingUntilIndexFound should be overrided tooļ¼Œotherwise the AI canā€™t pass through its ally. In addition there is another problem in function FindReachableIndexClosestToTarget in BP_GridManager. If the unit uses BP_Path_PassThroughFriendly, its faction will be checked. But there is nothing in the variable Active Unit. In fact I searched all blueprints and I canā€™t find where to set the variable ActiveUnit.

Therefore I have made some changes ,but iā€™m not sure itā€™s right or not.

Finally I donā€™t know the executing line should be connected to the output ā€œTrueā€ or "False"of the branch , where I have added a breakpoint. I guess itā€™s ā€œFalseā€.

Here is a quick example:

On BP_Unit.

Hey, thanks for the bug report and the suggestions. Not including the relevant PassThroughFriendlies code in the ContinuePathfinding variant was an oversight. I will fix it in the next update.

I have tested out the the FindReachableIndexClosestToTarget code and it seems to work fine when used as it is set up in the move abilities. Iā€™m guessing you are using it in some other way? Could you give me the repro steps for the issue you are seeing? In any case the code I have for getting the unit that has called the pathfinding is a bit clumsy. Here is my suggestion for how to change it. Hope this will also work for your use case: FindReachableIndexClosestToTarget posted by anonymous | blueprintUE | PasteBin For Unreal Engine

Thank you for your suggestion. I have no more questions about this.
All my doubts are about the variable ActiveUnit, because I canā€™t find where to set it.
Since it has been replaced,there is no more question.

Ok, good. If you are still wondering where ActiveUnit is set, I understand if it was a bit tricky to find. It is set in the OnRepActiveActor function in BP_TurnManager, ensuring that any time ActiveActor changes, so does ActiveUnit. If you are struggling to find where any variable is set I recommend using the Find In Blueprints (You can find it in the Window menu of UE4), where you can search for variables and functions across all blueprints in a project.

I am reviewing your tutorials which are super helpful. In my case, I am trying to tie in Die Rolls to drive the movement distance. I have a die pack with all the necessary blueprints, I just need assistance on how/where to create the event within the player to make them roll a die, the die number determines the number of grids they can move, then have the player clcik the hex grid to move to that locationā€¦ any direction or advice?

Hey Ian, following up on your question from here and on Discord. So time is a bit short this day so Iā€™m resolving this request a bit different than usual. I jumped into UE4 and tried my hand at implementing your requested feature. I did not test anything out beforehand and it is not edited so it includes some misclicks and pauses, but it will give you the steps to achieve a starting point.

Let me know if you have any questions about the things Iā€™m doing here. Perhaps the most confusing one is why Iā€™m using both a dice blueprint and a dice actor that gets called on. This is basically a hack to get the dice blueprint to work as part of the action queue. It is different from how I would normally do things, since ATBTT is built with the assumption of game logic not having to wait for things like physics to resolve game relevant logic, but it should do the trick.

You will obviously have to replace my super simple dice blueprint with the one you are using.

Here is the video: Dice Throw for movement for Ian Farley - YouTube

Hope it helps!

I Make Changes and Nothing Happens
add video.
2021-05-13 00-19-36.mkv - Google Drive

Hey, I did not mean that you needed to add it exactly to that blueprint. You need to add the check as appropriate to the ability you are actually using (the one with counter attacking). It checks how far it is between the units, so you want to add it before the counter attack code.