edited April 2016 in Makinom Support
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:

image

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:

image

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.
Post edited by Keldryn on
  • Add a NavMesh Resume node after setting the destination. If the agent is stopped it wont move anywhere without resuming movement.

    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).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks, @gamingislove! That seemed to do the trick.

    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?

  • edited February 2016
    Well, setting a NavMesh destination on a game object without an agent attached wont do anything ...

    Next Makinom update will bring an option to use resume in the NavMesh Destination node directly.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • No, I meant that in the "use object" case, the target is not a character with a NavMesh Agent attached, but in the "talk to NPC case" the target is an actor with a NavMesh Agent attached.
  • Hm, since you're not actually moving the target, that shouldn't make any difference. Unless the NavMesh agent reacts differently when moving to/near another agent.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.