How do I make enemy sprite to walk left to right?

0 favourites
  • 2 posts
From the Asset Store
A complete set of graphical user interface (GUI) to build 2D video games. With wood, nature, & jungle theme
  • Hi, I am trying to learn how to:

    1) make an enemy sprite to walk left to right on a floating bridge. Below is an example. The problem I am having is that the enemy walks right to the end of the blue sprite and stops there. But it does not get mirrored to the left to show it turns around, nor does it walk left once it reaches the right end of the blue sprite. It is walking, but stuck at that area.

    The code I have used for this on my Layer Sheet is:

    2) I also would like to ask if anyone can let me know what is the standard ways to make the enemy walk left and right on the ground platform where there is no edge? Is there any links to any video tutorials for this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. The same code works for me.. Maybe the goblin sprite has some weird collision polygon or an origin image point position? Try with a rectangular polygon and the image point in the middle.

    2. You can use invisible sprites to limit movement. When enemy collides with such sprite, toggle its direction.

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