Helo, is it possible to make something like click to move to the waypoint? I would discribe it like you click on terein and you get first waypoint and it’s action. Then character moves to it, stops there and then do some action. If I click another time while character moves, then it store another waypoint and it’s action, and move to it when first action is done?
@Luger: Hey. There are quite a number of ways to accomplish this, which I am sure @prime can explain. However, if I understand your query, the first thing you would have to do, is to script a mouse click event (assuming it is for pc), which shoots a raycast that detects the position where the ray has hit on the terrain. This will then allow you to add a rain navigation target to said point. Alternatively, you could just create a prefab which gets instantiated at this transform point. The prefab can contain visual aspects among other components.
After, it is a simple matter of the NPC detecting the aspect and moving towards it, and execute whatever action you want. This is all dependent on the BT you create. Alternatively, you could create a custom behaviour script for the NPC, reference it from the raycast script, and tell it what to execute as a custom action.
I am sure there are still a number of other ways, but this is what I got from the top of my head. Hope it helps a bit.
This reply was modified 6 months, 2 weeks ago by BrokenHelmet.
Y - I would certainly do it using a custom action, where each time the player clicks I add another waypoint/action to a queue, then let the custom action pull things off the queue and execute them one by one.