Spawn Unique Enemies

0 favourites
  • 5 posts
From the Asset Store
Pixel Enemies for SHMUP consists of 45 enemy ship sprites to be used in your game.
  • Greetings!

    When i spawn a sprite enemy and shoot it, it kills all instances that were spawned.

    I would like it to kill just the enemy that was shot.

    Any help would be greatly appreciated.

    ~Chase

    Tagged:

  • Thats a hard to answer question, without seeing your code.

    normaly if you you da something like

    Sprite1 on collision with Sprite2 {Sprite2 destroy}

    it should only destroy the Sprites involved in the process as they are picked by construct with the on collision condition

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So this was my first tutorial I made a long time ago haha so it's not super perfect but it might help with a few others things when it comes to spawning random stuff. You also should create a family and name it something like enemies. Add your enemies to that family and then give that family an instant variable (number) call it enemy hp. You then can set each enemy with it's own hp. even if all of the same one's are on the screen it will only take hp from the enemy that's hit. Do something like enemy on collision with player bullet, subtract 3 from enemies hp. As I said it will only take hp from the enemy that's getting hit with the player's bullet. Then have an event when enemies hp (this is the family hp) is = to or less than 0, destroy! Hopefully this helps and good luck!!!

    Subscribe to Construct videos now
  • Sorry for the limited info...I will give the tutorial a shot as well. It may be the animations causing this action for all soldiers?

    Main Character on collision with Trigger OBJECT > Spawn OBJECT > Spawn Soldier

    Soldier On collision with Bullet > Set animation to "Die"

    Soldier Destroy

    Bullet Destroy

    Had an issue uploading image

  • Hi, easy fix :)

    Need 2 things:

    1) Give an instance variable (Health) to your enemies and add an event saying that every time they are hit remove 1 health.

    Then another event saying when their health is equal or less than zero you initiate your death process / destroy.

    2) When you are shooting them add an extra condition to pick the enemy instance on top so if you have multiple enemy instances on top of one another 1 bullet will not do damage to all but instead only to one (the one on top).

    Best of luck,

    COSMOS

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