Display this but not by Each enemy

Get help using Construct 2

Post » Sun Sep 03, 2017 6:49 pm

@dop2000
Maybe better will be to show cloud for third enemy, then for seven etc. But problem is when third enemy is spawned, all first 3 enemies showing cloud in same time.
Can you hel? how show this cloud for third enemy not for 3 enemies.
Image
B
10
S
4
G
2
Posts: 197
Reputation: 2,382

Post » Mon Sep 04, 2017 3:01 am

It's hard to help you without seeing your game. Could you share the CAPX?

How many Sad sprites do you have on your layout? Did you put Sad and Enemies in the same container?
If you did and you have many instances of Sad sprite (for example 3 enemies and 3 Sad clouds), then you may have this problem - the cloud will be showing for all 3 enemies at the same time.

I suggest you keep just 1 instance of Sad sprite, invisible by default. And not part of any container!
Then you move it and pin it from one enemy to another (as in my first screenshot).

Another way is to create a new instance of Sad sprite when you need to show it and then destroy it after it fades out.
This is how it's done in my CAPX example, and this is probably the best way to do it.
Check out my awesome game Doptrix
B
17
S
9
G
50
Posts: 829
Reputation: 27,967

Post » Mon Sep 04, 2017 8:28 am

@dop2000
So are you convinced to your capx file. I'll made it again.
How many Sad sprites do you have on your layout?
30-40
Did you put Sad and Enemies in the same container?
Yes

I suggest you keep just 1 instance of Sad sprite, invisible by default. And not part of any container!
What means" "keep just 1 instance" I'm not sure what "instance" is ;-).

thanks!
B
10
S
4
G
2
Posts: 197
Reputation: 2,382

Post » Mon Sep 04, 2017 8:45 am

So you have 30-40 instances of Sad object.
That's why you are having this problem. It's difficult to keep track of them - determine which ones are visible, which ones are fading etc.

That's why I suggest removing Sad from the container. And only create one instance (one "copy" of Sad object) when you need to display it, as it's done in my CAPX.
Check out my awesome game Doptrix
B
17
S
9
G
50
Posts: 829
Reputation: 27,967

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 49 guests