I am trying to create a type of interaction similar to PC RPGs like Fallout 1 & 2, Baldur's Gate, Wasteland 2, etc, where you click on an object or character and your character pathfinds his way there and then performs the interaction. I got this working well purely using ORK event steps, as detailed in
this tutorial.
I wasn't satisfied with the number of steps that have to be repeated for each specific event file, so I was in search of a way to be able to move much of the common logic into smaller, modular components. Hence, I turned to Makinom.
I got this working pretty much flawlessly for interacting with an object, and it did help streamline the ORK events to some degree:
I was able to take all of the movement-related steps and the loop that checked for the status of the navigation into a Makinom schematic.
This schematic looks like this:
However, when I apply this same logic when another character is the target, it only works the first time.
It works just fine using ORK events, no matter how many times I click on the NPC. This is the Move Event that handles navigating to the NPC:
But when I use the exact same logic in a Makinom schematic, it works fine. The first time. After that, the player just stands there when I click on the NPC. I've checked dozens of times, and I am passing the Event Object as the Machine Object and the Player as the Starting Object -- and the correct actors are being assigned in each step. As I said, it works exactly the same as the ORK event the very first time.
But it doesn't work after that, and I have tried both using the position of the Machine Object as the NavMesh destination as well as setting a local variable to the position of the Machine Object and using that as the destination. In both cases, it works the first time, and then the player
never starts moving towards the NavMesh destination set in the schematic. I have put debug notifications into the schematic, and it does reach the loop where the destination is set and the remaining distance is checked in a loop. It just never gets out of the loop, because the player never starts moving to the destination.
@gamingislove, am I missing something important as to why it would work differently in Makinom than in ORK?
EDIT: I forgot to mention that if I store the
destination field of the NavMeshAgent in a variable and output that value to the screen, it is correct. So the destination is being set on the agent, but it doesn't start moving.
The ORK Change Nav Mesh Target step does that automatically, in Makinom this is an extra node to allow more control over it (e.g. if you first want to set the destination of multiple game objects and start the movement at a later time).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I guess it was working fine when interacting with a stationary object (a chest, in this example) because the character has a NavMeshAgent attached to it and the stationary object doesn't?
Next Makinom update will bring an option to use resume in the NavMesh Destination node directly.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!