just one of them

For questions about using Classic.

Post » Thu Nov 01, 2012 7:16 am

Hello!
In my game I'm going to change the animation of a sprites that are in a group.But I just want to change the animation of one that ovelaps the player.What should I do?
B
14
S
4
G
2
Posts: 91
Reputation: 2,390

Post » Thu Nov 01, 2012 11:14 am

If you have an event for collision the event picks only that one instant relevant to the event. So you could just simply have it this way:

-sprite collides player
->sprite: set animation to jump

The only sprite that'd change the animation would be the only one colliding with the player. Is this what you asked or did I misunderstand?
B
11
S
2
G
3
Posts: 100
Reputation: 2,150

Post » Thu Nov 01, 2012 3:31 pm

Does it also works with overlap?
B
14
S
4
G
2
Posts: 91
Reputation: 2,390

Post » Sat Nov 03, 2012 10:27 am

Yep, overlap should work fine too! Just make sure it's:

Sprite overlaps Player

And not:

Player overlaps Sprite

Otherwise you might run into picking issues.
B
15
S
7
G
7
Posts: 250
Reputation: 5,298

Post » Fri Nov 23, 2012 2:51 pm

thank you silver!
It is done for all but one.
When I want to change the animation,it doesn't work.I mean all of the sprites which are in the family change animation.what shall I do again?
Thank you for your answer!
B
14
S
4
G
2
Posts: 91
Reputation: 2,390

Post » Mon Nov 26, 2012 10:50 am

hey!
I need the answer!
no answer?
B
14
S
4
G
2
Posts: 91
Reputation: 2,390

Post » Mon Nov 26, 2012 5:44 pm

Use a "For each object" loop from the system object and select your object family. Then as a sub-event put the animation conditions. This way it only picks one of the objects in that family.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests