Object Selection Question

This forum is currently in read-only mode.
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Say you've got an enemy with a value of 0 who collides with another instance of itself with a value of 1. In turn, the actions to that event apply only to the enemy with a value of 0.

    How would you turn that into an event? (I'm using a family "PlatformEnemies" by the way)

    To be a bit more clear, what I'm trying to do is get my platform enemies to turn around when colliding with eachother, but change which one turns depending on how they collide and which enemy is doing what at the time.

    Examples:

    Two enemies facing eachother collide - turn both around. That's an easy one.

    One enemy collides with an enemy who's currently turning around - Only turn around the enemy that wasn't turning.

    One enemy falls on top of another enemy who's facing the same direction - have the enemy that fell turn around, leave the other one as it was.

    One enemy somehow ended up overlapping the other enemy, and they're both walking in the same direction - Have one of those enemies stop until they're no longer overlapping.

    As far as I know there's really no way to write events like this.. I've been messing around with the advanced collision condition, but I still haven't gotten anywhere. Any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could try:

    enemy private variable =0

    ->enemy on collision with family "PlatformEnemies"

    -->enemy do stuff

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