Problem with enemies All dying

Get help using Construct 2

Post » Wed Mar 28, 2012 5:17 am

I am making am making a megaman style platformer. When the player shoots the enemy and the bullet collides with the memes it takes 1 away from the Heath variable.   When the variable is Zero, the enemy dies.   But istead of only that one dying all instances of that enemy type die. I don't know how to share capx on the forums or I would upload it here.   A second problem I am having is that after I go to my second level performance drops   The game is so slow and te only thing there is some titled backgrounds, the player and some platform sprites invent even added the enemies :(. I'm supposed to turn this in for an alpha version tommorrow. I am screwed.
B
4
G
1
Posts: 15
Reputation: 1,030

Post » Wed Mar 28, 2012 5:48 am

Upload your capx on dropbox and paste the public link into a post.

Without a capx, hard to say what's going wrong. It sounds as picking issues and perhaps useless loops or something cpu taking on the change of layout (maybe the startup of second layout performing useless tasks).
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,805

Post » Wed Mar 28, 2012 6:46 am

very simple solution,

get rid of the variable.

just

Bullet > On collision with > enemy
       > Destroy Enemy
       > Destroy Bullet

the bullet will ONLY kill the enemy touched, it will only becomes necessary to use variables and more programming and groups, if the enemy's health is over 1. As for your slow downs, I think you are programming everything to hard for the system. Try to cut back on the variables and use groups instead.Erndog2k2012-03-28 06:55:06
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Wed Mar 28, 2012 7:50 am

[QUOTE=Erndog2k] I think you are programming everything to hard for the system. Try to cut back on the variables and use groups instead.[/QUOTE]

@Erndok2k: That's pretty silly.
You're suggesting that C2 isn't made to deal with variables and groups ?
You're so very wrong.

Instead of removing variables, learn to use them and how the events work, this is all the base of work with C2.
Discarding them is just awfuly wrong.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,805

Post » Wed Mar 28, 2012 7:52 am

[QUOTE=Kyatric] [QUOTE=Erndog2k] I think you are programming everything to hard for the system. Try to cut back on the variables and use groups instead.[/QUOTE]

@Erndok2k: That's pretty silly.
You're suggesting that C2 isn't made to deal with variables and groups ?
You're so very wrong.

Instead of removing variables, learn to use them and how the events work, this is all the base of work with C2.
Discarding them is just awfully wrong.[/QUOTE]

No I'm just saying in his particular situation and in many situations they are not needed, and just become redundant in the system. I feel/think this can cause slow downs. Like you said they need to be applied correctly. Erndog2k2012-03-28 07:55:01
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Wed Mar 28, 2012 3:55 pm

here is the capx of my project. ProjectGallis2012-03-28 15:56:47
B
4
G
1
Posts: 15
Reputation: 1,030

Post » Wed Mar 28, 2012 4:16 pm

[QUOTE=Gallis] here is the capx of my project. Project[/QUOTE]

Here you go I fixed it.

Your Capx
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Wed Mar 28, 2012 5:44 pm

Alright well now that works. Now I am finding a problem where they will all shoot at me when one of them finds me. They others will try to move to me and kill me. Im not sure how to limit it to just the one who is closest to shooting me or how to keep the enemies from following me once I leave or they get close to the edge.
B
4
G
1
Posts: 15
Reputation: 1,030

Post » Wed Mar 28, 2012 7:56 pm

Just a random Idea pure Theory, try placing a Proxy around the player.
When the proxy Collides with Closest enemy, Enemy Wakes up. Hope that helps.
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Wed Mar 28, 2012 8:54 pm

Here is my current version of the game with some added music. Currently the second level is still very slow. I am not sure how to make it not so slow. I am also having a problem where the music of the level is way to loud. Tried to use the command to make the volume lower but apparently doesnt work. I am not sure how to set up the Proxy. I have two hours till I need to show off the Alpha version. sigh. Current versionGallis2012-03-28 20:55:31
B
4
G
1
Posts: 15
Reputation: 1,030

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests