Conditioning (collision/animation)

For questions about using Classic.

Post » Thu Jan 14, 2010 8:29 am

I believe this is another basic question from me.

There are 4 sprites on a nearly white canvas.
When the "enemy-sprite" collides with 1 sprite, I would like to see an animation playing on only that 1 sprite, where the collision happens.

Everything is ok when I do:
Enemy: on collision between Enemy and Sprite
>sprite: set animation to "dance"

But when I add as a 2nd condition:
Sprite: animation is not "dance"
all 4 sprites change their animation and react to the collision, which only happens on 1 sprite.


Confused me.
Because I thought the conditions are as follows:
- collision happening between red and sprite
and
- animation is not "dance"

The other 3 sprites do not have any collision going on, so why do they react to this?
Is this bug? :roll:

Awaiting your reply. :)
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Thu Jan 14, 2010 9:28 am

Is the condition within the same event?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Jan 14, 2010 5:32 pm

[quote="Mipey":96f41vsl]Is the condition within the same event?[/quote:96f41vsl]
yes
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Thu Jan 14, 2010 9:21 pm

Oh, I see... you are filtering by Enemy, not Sprite.

Set the collision condition to Sprite: on collision with Enemy. Or use the advanced overlapping, which can filter both.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Jan 14, 2010 10:54 pm

[quote="Mipey":25w8mfrl]Oh, I see... you are filtering by Enemy, not Sprite.

Set the collision condition to Sprite: on collision with Enemy. Or use the advanced overlapping, which can filter both.[/quote:25w8mfrl]

Wow, I didn't know that. :(
I never thought it mattered which object (sprite or enemy) should be selected first to make a collision-condition...
I will try that out tomorrow. Thanks.
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Fri Jan 15, 2010 8:17 am

It's totally working 8)
B
16
S
5
G
7
Posts: 599
Reputation: 5,000


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests