Can you please quick tell me where exactly the exhaused bool is set when a unit ends his turn? I am still working on the wait function. (Initiative GameMode)
While making a copy of the end turn button I saw that this will lead to the ānormalā turn manager even if there are override functions present in the initiative turn manager. Is that intended? Or should there be some kind of āgetTurnMangerInStateā or somthing before?
Btw. I have edited my cam rotation post with a clean up version of the mouse rotation.
thank you
Quick question: if I create a new level without grid it still lock on the game camera and also throw some errors ( Blueprint Runtime Error: āAccessed None trying to read property CallFunc_FindGridManagerInState_GridManagerā. Blueprint: BP_TurnManager Function: Execute Ubergraph BP Turn Manager Graph: EventGraph Node: Branch).
How can I do so i can have some maps unrelated from the game system (for menu, character selection etc)?
There isnāt an exhausted bool in the later versions of the toolkit. I found it redundant, as in each case where I used it I could instead check if it has 0 AP instead. The exhaust interface is called as part of the RunOnEndActorTurn interface event in BP_Unit, which is in turn called from the Turn Manager.
Are you sure? If you call a function or event on a child actor that overrides that event, the parent version should never be called. Can you give me the repro steps for this?
Thanks! I cleaned it up in a similar way when I implemented it after seeing your initial suggestion.
When you create new maps in UE4 they will set their GameMode blueprint based on the default game mode defined in the project settings. For ATBTT this is the BP_ATBTT GameMode blueprint, which has a built-in assumption that there is a GridManger in play. For maps that do not use a GridManager, change the GameModeOverride in the WorldSettings of that map.
My foult I looked at theTurnmanagerStrategy while testing out the initiative one.
Second one directly with repro steps: Big units wont get removed from grid after they are killed , or I have forgotten something:
Repro: Open new Project - open the basic map - set the gridmanager max unit size to 3 - place two bp unit anim with size of 3 - kill one and game wont end. Attached screenshot.
You canĀ“t reasign the normal pathfinding to a unit after changing his size back to 1. I think this is because you are declaring units with sizes >0 as big units. What would be okay but, the problem here is, when a unit got a size of 0 you just can move āinā them with big units.
**Repro: **Basic Map - 2x bpunit anim - gridmanager to max unit size 3 - one unit size 3 and player - one unit size 0 and enemy. Screenshot attached.
Btw. I have increased the unit size to 3 because a size of 2 doesn“t have a center tile and will cause other problems.
Hey, seems like I unknowingly broke some big unit functionality in the last update. Thank you for telling me and for the thorough repro steps. Try the following fix and see if it solves your issues:
What is the recommended way to remove abilities that a unit has in game.
I have a status effect that grants abilities on activation, which works well, however Iām not sure the best way to remove the granted ability on disabling the status effect. Removing it from the list does not seem to do the trick, and there does not seem to be a counterpart to the Add New Ability node.
Figured it out, I needed to remove the ability from the player controllers ability refs array. It would be great to know if this will cause any issues or if there is a better way to handle this.
Hi Clayton, I donāt recommend removing the ability from the player controller. The player controller holds a list of all abilities that are available for that player, independent of units. To remove the ability from a specific unit, remove the appropriate item from the two ability arrays in the ability system component of the unit.
Here is a quickly thrown together level blueprint with this functionality to illustrate:
Any ideas why the grid snapping would place things half a meter above the grid? Pressing āPlace Actor at Anchorā moves the actor half a meter upward. Iām pretty sure I have misconfigured something but I cant seem to find any differences between my setup and the examplesā.
Sorry, I forgot the second part of your question. What you are seeing is by design. I have not intended units to be able to end their movement within the spaces occupied by big units. Big units have their positions set on the GridUnits map for all the tiles they occupy. If you end the movement of a small unit within that area, one of the references will be replaced by a reference to the small unit. I do not know what issues it would cause, but I have not designed the system with this in mind. I do not think I have played a game where you would be able to do this, so I did not even consider this as a potential feature players would have. If you want to have this in your game you will have to do quite a bit of modification, I expect.
Maybe the mesh of your actor blocks PathTrace? If so the trace will hit the top of the mesh and place the actor at that location instead.
Hmm, Ok, I will try playing around with the mesh collision settings. Not a big issue, using the ignore snap setting and just placing them manually is working well enough so far.Thanks!
What would be the recommended way of updating the edge costs of a tile during gameplay? I took a look at the video where you create a destructible tile, but it seems that the system has changed significantly since it was recorded. Basically I have re implemented the code from BP_GA_Tileās construction script in its own function and call it when I want to update the tileās edge costs. This seems to update the arrays correctly but does not seem to effect pathfinding.
You can use the UpdateTilesInRange function. It updates tiles in a defined tile range of a location or grid index. It uses tracing for walls, floor etc. as specified for your GridManager generally. Note that it will not take into account the edges added by BP_GA_Tile actors, but uses the procedural system instead (which I describe in this and this video)
I changed the size to add big units in the grid manager, however I cant figure how to make a particular unit take out more then one space?
Is there documentation on larger units?
I cant find access to simply move the camera to a different position as it hovers over units. I tried the BP camera but nothing. Sorry to ask such a simple question, but how to move the camera?
Ah maybe I was not clar enugh, sorry for that. I mean, that in a blank project an BP_Unit_Anim has a size of 0. That leads to the thing that bigger units where able to overlap their tile like shown in the screenshot In addition, when you edit that value to 1 it directly marked as ābig Unitā for pathfinding etc. That is not intended I think, as the standard size of a unit should be 1 I think.
Hi, big units is an experimental feature and currently has little in the way of documentation. You need to change MaxUnit size of BP_GridManager (max is 5) and then set the size variable of your units to whatever value you want.
Not sure if I understand your camera question. You can move the camera with WASD or the arrow keys, but Iām assuming you mean something else?
Ok, thanks for clarifying. So a size of 0 means that the unit ignores all big unit functionality. It does not update the GridBigUnits map when it ends its movement, for instance, so big units will be allowed to move close to the unit so that their extended big tiles overlap the unit. A size of 1 takes up one space, but does update the relevant arrays. If you are using big units you should not at the same time use units of size 0, but instead use size 1.
@Infest1908 Iāve been away for a while and I didnāt see your post. Thank you for taking the time to show me how to do that. I have a couple of questions, if you donāt mind:
Is the FloatCamRotationSensitivity an exist variable, or a new one that you created? Is there a particular range of values that you could suggest?
Is the Input Action CamRotationMouse new as well? If yes, did you just set it up in the input manager? Is it keyed to a particular mouse button?
I can chime in on this A mouse look sensitivity around 10 feels pretty good, but you can adjust it by feel. It is a new variable added to BP_GridCamera. As for clamping the pitch you can go as extreme as min: -89.9, max: -5 if you want a range perfect top down to just above the floor. You should indeed use a new input action that you can set up in the input settigs in the project settings. Iāve personally keyed it to middle mouse button.
Have you ever had an issue with the Jungle Raid map where once you shoot with a unit, the game freezes. Iām just using the default characters but I donāt see where itās hanging up. If you could point me in the right direction, it would be appreciated.