Horizontal zigzag

0 favourites
  • 2 posts
From the Asset Store
a full game example, menu system, with the first level and a boss, to create a horizontal shooter
  • Hello everybody ,

    I'm developing a game that enemies must traverse a predefined path (horizontal zigzag crossing the screen), but I can not configure this movement.

    Besides the movement, the enemy will appear in random locations.

    Could someone please help me?

    Thank you!<img src="smileys/smiley17.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use Sine behavior and Triangle option, or, a easiest way, use destination points with IDs.

    When the enemy overlap the destination point with ID 0, and his ID is 0 too, make him follow the next destination point with ID 1, then, change the enemy ID for 1 and ahead.

    To make your enemy go to the destination point is simple, and have many ways:

    Setup your enemy to have the instance variable ID, the first valor is 0;

    The same for the points, each point with a different and crescent ID number;

    Everythick:

    Enemy.posX < Destination_point.posX;

    Enemy.ID = Destination_point.ID;

    < Enemy.posX = Enemy.posX +1;

    Enemy.posY < Destination_point.posY;

    Enemy.ID = Destination_point.ID;

    < Enemy.posY = Enemy.posY +1;

    Enemy is overlapping Destination_point;

    < Enemy.ID add +1;

    Got it?

    If you still needing help I'll do a sample for you.

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