Object Selection Question

For questions about using Classic.

Post » Sun Jan 02, 2011 2:51 pm

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.


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?
Posts: 1,768
Reputation: 17,862

Post » Mon Jan 03, 2011 5:49 pm

You could try:
>enemy private variable =0
->enemy on collision with family "PlatformEnemies"
-->enemy do stuff
Image Image
Posts: 7,239
Reputation: 61,506

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests