Either they don’t attack or just one of them will attack?
You are using “Thief” in the for each event but in the sub- events you are using “KnifeThief”. Maybe that is the problem.
You need to replace either Thief with KnifeThief in the for each event or KnifeTheif with Thief in the sub-events.
In case Thief is a group holding all kind of Thiefs, and you want them to behave differently based on which type they are I suggest to use an object variable to store the type of each thief:
For each Thief
--Sub-event: If Variable Near of Thief = 1
-----Sub-event: If Variable Type of Thief = "KnifeThief" then do this
-----Sub-event: If Variable Type of Thief = "AnOtherThief" then do something else
Actually, I just realized you are using the platformer behaviour for the Thiefs.
Last time I tried it didn’t work very well with multiple instances, I have experienced similar problems as you.
So the platformer behaviour is more likely causing the problem because the behaviour is designed with the player character, a single object in mind. If you use it on multiple objects, when you check if the object is on the floor or jumping or not it might not return an individual value for each object not even if you are using the for each event.
It maybe a bug in the behaviour or maybe it something that 4ian haven’t thought about when developed the behaviour. I don’t know but last time I tried I could not get it to work with multiple objects. So you might better off making your own platformer engine for the enemies and avoid using the platformer behaviour.
But in the last game i used the platformer behavior and it worked!!!
I’m only sharing my experience. If you have different experience and you are certain it is not the problem here then try my first suggestion.
It should work with a for each event as you can have multiple instances of objects using the behavior.
I thing there is an issue with the + Timedelta() action. And I am doing exact same steps as I did in the previous version.
You should do the “for each” on knifethief instead of Thierry as you’re using knifethief inside it.
I tried that!!! I think ddabrahim is right. I did face such problem in previous version too but I some how came to resolve it. I don’t know how? And I didn’t use for each object event instead I used too many variables. Which doesn’t make any sense.
Actually…maybe I’m wrong
I tried and failed to make a “proper” platformer enemy AI over a year ago. Since then the problem I experienced maybe solved. I just did a very quick test to make some object move left right and jump over obstacles using the platformer behaviour and it works
I can’t reproduce the “bug” I have experienced over a year ago.
Just wanted to point this out to make sure I don’t mislead anyone.
it never gives problem in basic platormer behavior. last time too it gave problem in attacking AI.