How do I make balls to be "juggled" ?

0 favourites
  • 2 posts
From the Asset Store
Minimalist Crash Balls is a game where the goal is to hit the ball on the portal, with 20 different levels :)
  • it's an enemy juggling 4 balls at the same time. How to code the movement of the balls?

    Note: there are supposed to be multiple instances of the juggler enemy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure if it would look good, but based on the picture shown, you could try making an orbital movement.

    You will need:

    -Ball

    -Origin point //Image point on the enemy ( user for the ball to orbit around)

    -variable Angle

    -variable Speed

    -variable Radius

    On an every tick event position the ball using the following:

    local variable "rad"(radians) = angle * (Math.PI / 180) // here we convert the angle to radians

    ball> set X> origin.x + radius * Math.cos(rad)

    ball> set Y> origin.y + radius * Math.sin(rad)

    angle > add value > speed // the angle variable is what defines the position of the ball..if you don't increase it the ball won't move

    ..

    Another try, sync 2 sines behaviours, one horizontal and one vertical, could also give you this effect.

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