0 Favourites

Matching families with different instances

  • 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!

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[Plugin] instance bank2
85 18,367
rexrainbow's avatar
rexrainbow
Unread hot topic
45 17,952
Yann's avatar
Yann
Unread hot topic
52 3,004
Ashley's avatar
Ashley Construct Team Founder