How to add a speed to an object?

I have this, but its giving me an unreadable error:


How could I fix it?

I’m not really sure exactly what you mean by setting speed as the answer could be a large number of things depending on what you’re doing and what you’re using.

Example: if you’re using projectile movement, there are different speeds
Example: if you use a “move to” there is a speed in an actor you can set in class defaults

My advice or question is why is this being done on event tick? Do you plan on setting the speed every tick/frame or just using this as a test?

If “Wind Directional Source Component” is in your BP, do a “Get [your wind directional source component]” then see if you can do a “set speed” from that. Maybe the node you see here, but explicitly putting in the component to the “target”

I want to make the NPC moves, only that. Forward, for example.

A few ways to go about this, but again depends on your use case. Such as:

  1. NPCs move from point A to B
  2. NPCs move in random patterns
  3. NPCs move to a dynamic point (such as the player)

You might use:

  • “Move to” node
  • Adding directly to the NPC’s position (x += 1, y += 1, z += 1) on tick, timeline, function timer, etc.
  • Black board AI logic
  • Any combination
  • Something else

You may need to use movement components (or the one in your picture, but I’m unfamiliar with it). Then you’ll need logic to handle the movement itself which there are a lot of tutorials on and an endless amount of videos online as this is something in almost every game

A quick google search of “unreal make actor move forwards” came up with a lot of answers. Here’s a very basic example:

Simple Actor Movement in Unreal Engine 5 - Step-by-Step Tutorial

NPCs move from point A to B is the best in this case. How can i do?

How to use AI MOVE TO node in UE4 || BLUEPRINTS || UE4 TUTORIALS

WTF Is? AI: Move To Task Node in Unreal Engine 4 ( UE4 )

How can i get the ai pawn?

In the first video, AI Pawn is the actor (or pawn) itself so it would be your NPC. He explains this in the video.

However, this thread is quickly moving away from your original question. It sounds like you have a lot of digging to do, but luckily a lot of tutorials of different styles on the topics to help you out.



EDIT:

It isnt moving with this blueprint, but at least doesnt crashes…

Im trying to make the all target actor appears in my blueprint but its impossible for me.

EDIT 2: Im trying to import the 4 actor points into the points but thats is impossible, or that i think…

This is a very poor set up. If you have different points (which can be empty actors you place in the level) you can:

“Get all actors of class” to get those points, but the points should be a specific type to avoid getting actors you don’t want (or hard copy what the points are). these would be your target actors. Or the hard copied location would be destination

Think about what you’re doing in your pictures:

  1. You’ve created a potentially infinite loop
  2. Your acceptance radius is 5 so your 2nd, 3rd, and 4th move to won’t happen because you’re already where you need to be
  3. You’re telling it to go to node 3 immediately after telling it to go to node 2 so you probably won’t ever get to node 2. Similar with node 3 vs 4

Start small. Get it to move 100uu away. Then get it to move to a specific actor. Then get it to move to a location, wait, and move to a second location. Then start adding more. You’re diving in way too quick on implementation, break it into smaller steps. Getting there though :slight_smile:

IMHO this question is answered

Ehm, i now think the point per point isnt enough for my scene, because i cant make invisible nodes because nodes generate before the construction so… do u can build a script for making the player go forward? no time limit… or at least show howto.

Just don’t anything with visibility :sweat_smile: ex. don’t assign it a static mesh

If you need to move the player forward that’s an entirely different topic and not for this thread. Again, google, youtube, tutorials, and templates are your friends

So i need to make a new topic?

I would google, youtube, and check out tutorials first before you do, but yes. You can also look in the forums to see if this question is there already.