Troubles with two instances of the same AI

  • Hi guys, I'm getting my hands dirty and trying to create some kind of basic Zelda like top down IA.

    Where I'm at, one mob works like I want it to, but when I put a second instance of the same mob, things are getting a little crazy.

    Subscribe to Construct videos now

    So I want each purple tick (that acts like a radar and a hit box and tell the actual sprite to be mirrored or not) to be tied to a different instance of the same sprite, make the sprite go through waypoints if the player is not in LOS, and chase the player if he is.

    When I make the puprple ticks visible, I can see that the two of them are here, but that one sprite is missing.

    Another problem, I think that when one of the mob is chasing me, the other one ignores me, and vice versa.

    Can someone please tell me what in my sheet is wrong ? (Sorry, my organisation isn't that great but I'm just beginning with construct).

    Thank you ;)

  • Add the purple box and the mob sprite to the same container. Read about containers here:

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers

    Also, you can't use "Move along path" immediately after "Find path". Finding path takes time, it may not happen in the same tick. You need to wait for "On path found" event to trigger.

  • Nice ! Thank you so much :)

    I'll give it a try and close the topic if it works for me !

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No problem! But just to clarify - combining objects into a container will not automatically fix those issues. You will still need to review and change some events.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)