Making enemies move left and right by them self

PumkinPie

  • Posts: 9
Hey!

How do I make enemies move left and right by them self eg 5 paces left and then 5 paces right?
I have tried but they only move, hit a wall then not move at all.

BlightXP

  • Posts: 121
You can try adding 'when self hits the wall move to the other direction'
abcdefghijklmnoyqrstuv-WXP&Z ;D

The8BitMan

  • Posts: 424
You can try adding 'when self hits the wall move to the other direction'
Yep, that's right. Use:
Make sure self is always active.
Set x speed to 5
If x of self = 0 or screen width - width of self
Set x speed to negate x speed.
Need music, graphics, scripts? Just ask!