Kill Count Help

For questions about using Classic.

Post » Thu Dec 02, 2010 7:03 pm

Hi:

I am making my own version of the ghost shooter game but I have run into some trouble.
I added exploding barrels that cause an explosion when they are shot 4 times and when the ghosts overlap the explosion, they are destroyed. The player then gets 1 added to their "Kill Count" private variable and the game displays "Kills:" and the amount of the "Kill Count" private variable at the top. My problem is that when the player kills more than one ghost at the same time using a barrel (which is bound to happen), the system only adds 1 to the "Kill Count" instead of the correct amount of ghosts that where destroyed. How do I solve this?

Here is a link for my cap:
http://dl.dropbox.com/u/7518552/Ghost%2 ... lution.cap

Any help is appreciated
Thanks
B
1
G
2
Posts: 6
Reputation: 637

Post » Fri Dec 03, 2010 10:21 am

[quote="Caustrol":1j874gaq]My problem is that when the player kills more than one ghost at the same time using a barrel (which is bound to happen), the system only adds 1 to the "Kill Count" instead of the correct amount of ghosts that where destroyed. How do I solve this?[/quote:1j874gaq]

Sounds like you need a For each object loop here. Try to set up your event like this:

B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests