A few questions...

This forum is currently in read-only mode.
  • Hi. I found Construct a few weeks ago on another forum and I decided to try it out. I'm currently working on a small zombie game and I've run into some snags.

    Here's the cap: carnage.cap

    1. How would I set an object to no longer be solid? In my game, my zombies were originally set to be solid objects, so the player couldn't walk over them. When the zombies "died," however, they were still solid and the player couldn't walk over them. I tried moving the "dead" zombies to another layer, but that didn't work.

    Also, while solid, my zombies kept pushing the player in the direction they were headed. How do I make them stop and "attack" the player when near him, and then start walking again when the player moves away?

    2. When a zombie is shot it creates a "blood" sprite that overlaps it. How do I spawn the blood sprite behind the zombie? Setting "blood: Place behind zombie" (which I've done twice) doesn't work. I think I got this to work once before, but I screwed up somewhere and forgot how to do it again.

    3. The kills counter (as well as the TotalZombies counter, I suppose) doesn't work because of the way I have the zombies' "death" set up: First I change their sprite, and then I have them fade out and deleted from play. This, however, causes the kill counter to increase repeatedly while the current zombie still exists. Is there a way I can make this action only happen once?

    4. I plan on adding more kinds of monsters (and possibly weapons) to the game, but I don't want to do all my events over again. Is there a way to have one event affect different objects the same way?

    5. In a different version of the game, I had both DirectSound and MOD objects (for gunshots and music, respectively). Whenever I played the gunshot sound while the music was playing, it screwed up the music. Is there a way I can stop that, or should I just use MP3s instead?

    Thanks for the help.

  • 1. How would I set an object to no longer be solid? In my game, my zombies were originally set to be solid objects, so the player couldn't walk over them. When the zombies "died," however, they were still solid and the player couldn't walk over them. I tried moving the "dead" zombies to another layer, but that didn't work.

    You could either disable solid and make your own collisions in the event sheet, or you could spawn a "dead zombie" where the living one was upon being killed.

    2. When a zombie is shot it creates a "blood" sprite that overlaps it. How do I spawn the blood sprite behind the zombie? Setting "blood: Place behind zombie" (which I've done twice) doesn't work. I think I got this to work once before, but I screwed up somewhere and forgot how to do it again.

    In your always event, moving the "place behind" to the top seemed to fix it for me.

    3. The kills counter (as well as the TotalZombies counter, I suppose) doesn't work because of the way I have the zombies' "death" set up: First I change their sprite, and then I have them fade out and deleted from play. This, however, causes the kill counter to increase repeatedly while the current zombie still exists. Is there a way I can make this action only happen once?

    Did you try using "Trigger Once While True" under system?

    4. I plan on adding more kinds of monsters (and possibly weapons) to the game, but I don't want to do all my events over again. Is there a way to have one event affect different objects the same way?

    Add them to a Family. Make one and name it something like "Monsters" then add them to the family and create your events using the Family instead of the individual monster.

    5. In a different version of the game, I had both DirectSound and MOD objects (for gunshots and music, respectively). Whenever I played the gunshot sound while the music was playing, it screwed up the music. Is there a way I can stop that, or should I just use MP3s instead?

    Not sure there. Haven't played with that much myself.

    Thanks for the help

    .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In your always event, moving the "place behind" to the top seemed to fix it for me.

    Worked for me, too. Thanks.

    [quote:3hxtb0ri]Did you try using "Trigger Once While True" under system?

    I tried it now, but it only increased the kill counter once, and then wouldn't increase it again after other zombies were killed. I'm assuming I was supposed to make "Trigger Once While True" a subevent of "Zombie: value 'hitpoints' less then or equal to 0".

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)