I'm making a game about light and i want the enemies to be repelled by the light when they overlap it. Any ideas how i might do this?
depends how you are using the enemy movement,
if you move the enemies by giving them a speed value (using a variable) then u can reverse that value (if is a negative value make it positive if its a positive value make it negative) and it would change direction.
mainly can be achieve by using a global variable call it speed, and set the object enemy movement speed to that variable every time it needs to, or you change that value.