Pathfinding (Chasing missile)

Hello, does anyone know how to make a pathfinder object chase a random chosen object? I am planing to make a chasing missile for my project. but it’ll only chase enemies. Not other objects like floor, background or the character itself.

Hi,
You should try image

How to use that? Can you give me example? I’ll wait for your reply. Thank you.

This exists in both conditions and actions, it is used to select an object or group to which the other conditions/actions will apply.
Just click on it and select an object or a group :man_shrugging:

Do you know how can I use a group of objects?

I mean, how to choose a random object. It just shows up only one object in the choices.

Create a group and add to the group all the objects that should be picked at random.
Then, when you add the condition/action, select the group name instead of an object.

Hello,
here you can see my very simple game. The men are moving following a random path.
Here the source used.

Can you give a screenshot? I still don’t get it. I want to create a chasing bullet. Thank you!

I mean the bullet is chasing for the nearest enemy. as long as the bullet is not missed.

not working

I guess I should have been more specific. I meant an object group not an event group.
Then you can pick a random from the group and use Groupname.X() as you did.

2 Likes

Thank you so much I am really just a beginner. Can you teach me how to make a group object? Thank you.

It’s okay to be a beginner.
Don’t forget to use the documentation, though.
Object groups on the wiki