0 Favourites

Problem with enemies All dying

  • 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.

  • 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).

  • 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.

  • I think you are programming everything to hard for the system. Try to cut back on the variables and use groups instead.

    @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.

  • > I think you are programming everything to hard for the system. Try to cut back on the variables and use groups instead.

    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.

    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. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • here is the capx of my project. Project

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • here is the capx of my project. Project

    Here you go I fixed it.

    Your Capx

  • 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.

  • 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.

  • 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 version

  • Volume Easy

    Add a tag so EX:

    Set sound to "Blah" Tag "Blah"

    Set Volume -15 Tag "Blah"

    the set volume I found HAS to be underneath with a tag.

    for the proxy

    Create a box or circle, Set it to every tick set position either to your player object, or just the X of your player.

  • Alright. Any idea on how to fix the performance issue on the second level?

  • Alright. Any idea on how to fix the performance issue on the second level?

    I didn't see it for the time I was there in that lvl it seemed smooth to me but my PC is a BEAST.

    P.S

    wen ever I died in the second level it put me back into the first it's a bit annoying to the player lol just a heads up.

    also I didn't know if I was getting hurt either u need some sorta health/damage taken indicator. Simple quick solution is to add Flash behavior to player. Then trigger it everytime player gets hit, mybe also add a quick text pop up for damage left.

    Every tick > Set Text > "Damage: " & Damage"

    the 1st Damage just the text to be displayed before number below

    2nd is your global variable handling your health number

    -Edit-

    you could have in the enemy bullet collision event, the text pop up, by adding EX:

    Bullet on collision with > Player

                             > Spawn object on > bullet > text

                             > set Visible > Text (Set Fade behavior)

                             > -1 from "Damage"

                             > etc....

    as long as you have a group handling the,

    Every tick > Set Text > "Damage: " & Damage"

    the text will be updated every time player receives damage.

  • Oh that was another problem. I cant seem to get the text to pop up in the first two levels it only works on the Last level. I will add in a flash sequence.

  • Oh that was another problem. I cant seem to get the text to pop up in the first two levels it only works on the Last level. I will add in a flash sequence.

    I fixed the text for LEVEL 1 just do what I did for the rest.

    link coming

    Your Capx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
98 7,594
norum82's avatar
norum82
Unread hot topic
87 5,375
facecjf's avatar
facecjf
Unread hot topic
80 10,057
jonathanbencomo's avatar
jonathanbencomo