No announcement yet.

NPC follows Path

  • Filter
  • Time
  • Show
Clear All
new posts

    NPC follows Path

    We've all seen the YouTube videos posted around demonstrating how to make an NPC follow a path, how to make a crowd, and subsequently make a crowd follow a path.

    It's really not working for me.
    I've tried searching for solutions, tooled with settings, and sacrificed small animals. Nothing seems to work and I can't get the stains out.

    Herein you can see the scene I'm working with. Very small, very simple.
    I have two pathnodes and a skeletalmesh (i've tried with both Regular and Mat-thol)

    Here's my sequence with the Level Loaded and Visible plugged in. Hooray!

    And finally the creme de la creme of frustrations.

    As the tutorial on YouTube illustratd, I have a Patrol Sequence which is activated by a Level Loaded and Visible Event.
    It targets a DefaultVar which is plugged into the Sequence as an ObjectVar.
    The sequence itself, as you can see, is two, PathNode ObjectVars with Move To Actor(Latent)'s, the DefaultVar ExternalVar and the Sequence Activator.

    Furthermore, the YouTube video makes reference to an entity that will calculate a web of pathnodes automatically, without me setting them up in advance. I cannot find this mysterious entity.
    In fact, I know what Kynapse is, but NOTHING is named as the YouTube video mentions, and there's no high res version of that video so I can't tell what entities are being selected or placed.

    I'm trying to get an actor to walk/run back and forth between the pathnodes. I don't want to use Matinee because it was demonstrated without using Matinee.

    Any help would be appreciated.

    SkeletalMeshActors have no AI associated with them as far as I know so they cannot be told to go somewhere and understand what that means. If you use an ActorFactory with an ActorfactorAI factory to spawn a bot, then you can tell the resulting bot to move back and forth and it should work.


      I was under the impression that Kynapse, while integrated into the Unreal 3 engine, is something you have to license separately.

      According to their website:
      Kynapse, Kynogon's A.I. middleware solution, is today already fully integrated with the Unreal Engine 3 and is available for licensing directly from Kynogon.
      I worked a bit with this in Kismet and now I am trying to get the same results in UnrealScript level. I made a test where bots are spawned and they begin to the follow the player around. I essentially spawn bots from an ActorFactoryEx. The controller type is UTBot and the Pawn class is UTPawn. Once they spawn I use MoveToActor. On Finished (or maybe out in some cases where the pawn can't get to you) I use Get Distance from the pawn to the player (PlayerIdx 0) and then Compare Float. If that value is greater than a threshold value (200 on my end), then I delay 1.0 sec, and loop back into the Move To Actor.

      I hope that helps in some way. Like I said I'm working on getting this into UnrealScript in some fashion so I can custom tailor the actions of bots in a manner somewhat similar to fuzzy logic (giving them varying degrees of tendencies when they are spawned). If you have any questions please feel free to pm me. Take care.