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.
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.
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ā
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
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ā.
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.
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.