Issues with enemy movement

0 favourites
  • 12 posts
From the Asset Store
Give Sound to the enemies that are part of your game! :)
  • Hi,

    I'm working on a minigame with the following layout:

    Enemies are supposed to spawn from the pink and green spawn points, but during test runs enemies only spawn from the left side of the screen. Also the enemies spawned from the bottommost and topmost points don't move towards the central character. I'm using the following events, please let me know how to fix these issues:


  • The events look ok

    Do you have any small demo that you can share? because it must be something else interfering

    Also, make sure that you didn't pick any of those objects on the top event if any

  • Hi tarek2,

    Here's a link to the demo:

    I removed a lot of layouts so the demo contains only the minigame. Removing other layouts doesn't seem to have affected anything else and the issue I posted about is still there.

  • On my phone so cant really see/test much! Lower events were conflicting by the looks of it.

    Obviously not sure if that's what your after either - but sprite rotation can be sorted out easily enough

  • Thank you that is much helpful

    I checked your project and the spawners are working correctly

    But the are two problems:

    -You manipulating the objects Angle instead of the Bullet Angle on these two events

    That's why they get spawn perfectly but they never rotate or set the Angle towards your "HWBFairy" they just keep moving to the right outside the layout, you don't see them as they never enter fully into the layout.

    To fix this you can set the bullet setting "Set Angle" On then you can manipulate the object angle as you do so the bullet it will follow that.

    Or set just the Bullet Angle of motion in the events if you don't want to set the settings "Bullet Angle" On


    Second Problem:

    The spanners are to close to the layout so when they get spawned there is a little bit from the object edges inside layout that's why your

    Event 28 : is outside layout>>>>>> set angle towards HWBFairy is not working as it counts already inside the layout

    You can fix this just by moving a little bit farther the spawners

  • Hi MrClifford and tarek2,

    Many thanks for your help, it's working now. :)

    I just wanted to ask, is there a way of destroying all onscreen enemies at the same time?

  • Yes, you'll need a trigger event I.e timer, on pressed button etc then system - pick all (sprite) - (sprite) destroy

  • Many thanks MrClifford. Is there a way to trigger this after the pink bubble object has been destroyed? I've tried using its instance variable as a trigger, "is onscreen" and "is visible" inverted but none of these have worked.

  • Yes - just do Pinkbubble - on destroyed, then create a subevent System - pick all (sprite) - (sprite) destroy.

    But the enemies will still obviously spawn after this event as the spawnpoints are still there. If you want to destroy them all, create a family with spawnpoints and enemies, then you can alter the above code to Family - on destroyed, sub event - system - pick all Family etc

  • Many thanks, MrClifford.

    Is there a way to trigger the above event by tapping/clicking another object? Using "on destroyed" doesn't allow me to select "on tap object" and using "is touching" doesn't seem to work.

  • It all depends what you're trying to achieve. As I'm not 100% sure what your goal is I cant say!

    As its endless I would have though that when the pink bubble is destroyed you would want no more enemies to spawn and the game over event to start.

    If however you wanted the player to be able to destroy all enemies briefly as a special ability you could add a button that resets ever 10 seconds or whatever, then when the player clicks that all enemies are instantly killed

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi MrClifford,

    Many thanks, the resetting button was just what I needed. :)

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