Behaviour "Move Towards" multiple object

I have used ready maker for about a few months already but I still don’t know how to make the behaviour “Move Towards” move to not only a specific object but multiple objects that are in a class or move to the longest or closes objects.I am not sure this feature is available yet, if yes can someone teach me how?

1 Like

Hi @DerekEu!
Describe your task in more detail. How many objects do you want to use in the scene, how and when do you want the “Move Towards” behavior to change its target. The simplest solution for now is to add the required number of objects to the class and switch the target in the events for each of the objects when necessary. To do this, for example, you can use the “Counter” behavior for objects in a class. Consider this example:

Event1:

All objects in class "Targets" / Position / Is Above Object / Up Trigger

Affected objects in class "Targets" / Counter / Set Value / 1

Event2:

Target1 / Counter / Set Value / 1

Enemy / Move Towards / Set Target Object / Target1  

Event3:

Target2/ Counter / Set Value / 1

Enemy / Move Towards / Set Target Object / Target2

1 Like

I understand now but I have to make a lot of events due to the numbers of enemies and allies artificial intelligence I have, I am not quite finish my game yet but if I count my current AI, I have at least 18 AI that can attack, 1 Enemy’s Headquarters and 1 Ally Headquarters that can be destroy

1 Like

@DerekEu, How many you have allies?

10 enemies and 10 allies including headquarters. 9 enemies and 9 allies if not include headquarters, cuz I don’t know if building counts

1 Like

@DerekEu! Since you are using a large number of objects, this task cannot be solved in a simple way when you use the “Move Towards” behavior. We have been working on a big update for a long time, which will significantly expand the work with classes. Perhaps this update will be ready for the next release of the new “Ready Maker” build. But while it is not there, you will have to create about 18 additional events for just one task. Or look for other ways to solve your problem. Or, maybe wait for the update, when this task will be solved much easier. One of the additions will be that we will add the ability to select an object from a class in behaviors, which will greatly simplify the creation of such logic.

2 Likes

Thanks for your help

2 Likes

Dear @Ready, I very much look forward to this feature addition. Many games I attempted to build in Ready I ultimately abandoned because I ran up against the exact same issue as @DerekEu.

3 Likes

Hi @auntiel!:raised_hand: I am glad to see you again on the forum!:slightly_smiling_face: Yes, we definitely want to add it! Work on these features has already begun.

3 Likes

Great to hear that, @Ready, and nice to know I’ve been missed! :slight_smile:

3 Likes