Hi! I began using the toolkit recently, and it’s a great base to start from. But I am still struggling a little, so here are my questions.
I don’t know if these details of my project are important, but just in case. I plan to have several fractions on the grid at the same time, player fraction and 3 other Ai-controlled fractions, each hostile to one another. And every unit has the move range of 1.
1.I would like to create a “set bait” ability. Only the player has it, and it affects only a certain fraction. It also has a certain tile range where it works (like 3 tiles in every direction for example). So, if the player chooses to use it, the bait is set on the tile where the player unit stands. Then an ai-controlled unit of affected fraction in range should start trying to reach it. Here’re the parts I get confused about within the toolkit. How do I make an ai-controlled unit choose the bait as a primary goal in pathfinding? And how do I turn it into an ability blueprint?
2.I would also like to give the player an opportunity to move crates. The crate in this case is an obstacle that occupies an entire tile. So, moving it becomes possible if the player unit is standing on the tile next to the crate. This is not an ability, just an interactable object.
By clicking on the crate the player activates “crate moving” state in the unit: the animation is changed and new movement rules are applied. And clicking also disables it. These changes are supposed to happen within one turn.
The pair unit+crate can move only if the path is clear for both of them. Now it’s something like a 2-tile unit I guess. So if the crate is blocked on the east tile, and the unit is not, then the unit holding the crate cannot move east. But if there is an enemy unit in the crate’s way, the crate moves the enemy. Player unit can move the crate on the enemy, and by doing that move the enemy by one tile and cause damage to the enemy. If the enemy is standing against an obstacle and thus cannot be moved, then the enemy is just an obstacle.
After the movement is finished and the turn is finished, player unit stops holding the crate and on the next turn remains in its usual state (meaning not ready to control the crate until the player tells the unit to).
I hope the explanation wasn’t too complex. Can something like that be done within the toolkit systems? I can’t quite figure out how to change player unit’s pathfinding type and its visualization if an actor on the grid is clicked. The temporary pairing unit+crate also seems tricky, as well as setting the pathfinding that enemies are an obstacle for the unit and not for the crate.