Matching families with different instances

0 favourites
  • 1 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Been bugging me for some time, i´ll go straight to the issue:

    Topdown AI is done and each step works well individually. In the other hand, when a state is triggered, it swaps the behaviour of all instances in the family at the same time. I want to make each instance of the AI family work individually. I tried a system that matches an ID between the aiBoundingBox (not in the family) with the AI family, but seems useless.

    -Enemy (two sprites)

    ·Sprite ·aiCollisionBox

    AI (family)

    If aiCollisionBox is overlapping aiObstacles (family of sprites)

    -Dodge in the right direction with the right speed

    Else

    -Turn towards the player

    Edit: don´t mind that disabled event, I was just testing before making the screenshot.

    I know it´s dead simple, but I´ve found no answers by reading any family related articles/guides/manual posts, that´s why I´m posting this topic.

    If anyone comes with a way of simplifying the code a little bit too, it would be great!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)