HemanthShankar's Recent Forum Activity

  • I'm attempting to make a side-scrolling platformer shooter thing, but i can't get the simplest thing to work.

    I have multiple of the same enemies, which i need to go towards the player. I want to do this by making the enemy sprite see if it is to the right of the player (Has a higher X value,) and if so, the enemy will move left (using the platform behaviour with controls disabled), and vice versa. This works well for only 1 enemy.

    But for 2/more enemies, they all move in one direction based on what one of the enemies' location is compared to the player. I tried using instance variables for each enemy to see where it is compared to the player, but for the action of that event, all the sprites moved in the same direction.

    I thought this is because i'm using the platforming behaviour but it didn't work when i used moved forwards either. I don't know how to get each enemy to move in the direction that will lead them to the player. Sorry for explaining it awfully.

    Here is how it looks when using platform and move forward.

    (The blue square is the enemy, Direction is the instance variable, the value of Direction is which direction it needs to go)

    Thanks for any help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
HemanthShankar's avatar

HemanthShankar

Member since 5 Nov, 2018

None one is following HemanthShankar yet!

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies