So I am making a top down style hack n slash and I have the player moving in only 4 directions(Up, down, left and down). What I want now is for the enemies to move in a 4 directional way as well. Honestly not sure where to start with this so any help would be appreciated :).
Those all sound super complicated XD how would I go about starting the setup in blueprint? I have tried to find stuff on custom character movement component in blueprints but most of the stuff is c++.
The only way I can imagine getting the result you seek in BP is by micro-controlling AI’s movement. I mean telling AI where to go in a straight line and once it gets there tell it again, and again, and so forth.
You should be able to get a “path object” in BP, that could guide this kind of micro-managed movement.
I’m sorry but we don’t support this kind of movement for AI out of the box
I’m willing to put in the work just trying to look where to get started. I’ll research what you suggested some more and will come back if I have questions.
As a super simple limiter, when you tell the AI to move, make sure that either the X or Y value on the move to is equal to your current location. That would make sure you are only moving either vertically or horizontally.
So this is what I have for AI so far. Idk if I am doing this correctly or not, but right now it will move to the play when the player passes over a trigger. Should the next step I do be to get player location and then do a break vector and then set actor location to the player?
Little update. I now have ai movement that can move randomly and then chase the player in vision but what I want to achieve now is to put points on the map and make the ai randomly move to those points but only use one axis at a time. So basically no moving diagonally.