Move 2 chars together

I have a main character and its pet (dog). Main character start moving, how can i cause to dog to start following the main character after X seconds?

Watch tutorials.

For dog you need to make AI controller, and program its behavior.

But i suggest you follow some tutorials, this way you waste less time than trying to guess basic stuff.

Thanks, works fine.
Another questions:

  1. How can i cause to dog start move with any delay after the main char start moving, which blueprint block to use?

  2. How can i put dog in specific point relatively to main char? I mean how can i get coordinates of main char and transfer them to dog’s blueprint?

For the first point, I think maybe a timer might work? It’s been a while since I messed with Blueprints to do this as I’ve since moved on to C++, but there’s a node which allows you to trigger it, and then it will output every x seconds. You could trigger it when the character starts moving and then apply a transform to the dog at fairly rapid intervals. The lerp node may also provide some benefit for smoothing the transforms out.

For the second point, you’re going to want to look into the transform node and some math nodes (+, -, * etc.).

  1. I used block “Delay” and it works.

  2. How transform node in dog’s blueprint can get info from char (another blueprint)?

You can save a reference of it as a variable in your game mode as a quick, get your feet wet, sort of fix. I believe you can do this inside of the level blueprint.

I don’t think this is the best solution, but it’s been so long since I messed with blueprints, so I’m not sure what the ideal solution is.

I created global variable, but don’t see it in others blueprints, why?

Well if you created a public variable on your gamemode blueprint and saved it there then you have to use the ‘getGameMode’ node and connect that to a ‘getVariable’ node in order to see it.

For example, if the variable on your gamemode is called mainChar, then on your pet AI you might need to do something like
getGameMode->getMainChar and now you have your reference to your main character.