Getting an object to repel another object

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • You could give them bullet behaviour. It has a property called 'Bounce off solids'. It might fit, depending on how much you want the light to overlap. You could set the collision box to a minimum.

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