Cant get text bubbles to work.

Get help using Construct 2

Post » Sun Oct 06, 2013 10:42 pm

Hello. I'm new here so please go easy on me. :)

I'm making a game where I created a system where when an enemy is damaged a text bubble will appear on the screen showing how much damage was taken. This is working perfectly.

The problem I'm having is I'm also trying to do something similar when all enemies on the screen are damaged. Currently when several enemies are damaged at the exact same time, they will take the damage as they should, but the text bubble showing how much damage taken is only showing up over one of the enemies, rather then all of the enemies that took the damage.

Is there a way to make it so the text will show up over all enemies when they are damaged?

In other words, this works:


But this does not (the text bubble only shows up over one damaged enemy even though multiple enemies are taking damage):


(By the way, "cell" is the enemy. plasmaeffector is used when destroying enemies one at a time by touching them. radiationeffector is pressed to damage all enemies on the screen at the same time.)

Thank you for any help you may be able to offer!
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Sun Oct 06, 2013 11:30 pm

Hey Burvey, great explanation of the problem.

The issue you're running into is that system actions do not run on all picked objects: they simply run if all of the event's conditions were met. (I got this from here).

It is easy to fix though. Move your healthbubbles creation and setting the text into a sub-event with a System condition of "For Each cell". You can read more about loops here. Good luck with your game!
B
10
S
4
G
1
Posts: 58
Reputation: 1,420

Post » Sun Oct 06, 2013 11:43 pm

Thank you very much. That worked perfectly!
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], jbr190 and 36 guests