How do I make an object move?

Get help using Construct 2

Post » Fri Mar 28, 2014 11:33 pm

I was wondering how to make a ball move in a horizontal line at a certain speed and a certain distance. Also i would like it to keep going back and forth for that certain distance.If anyone knows how to do this please tell me! Thank you
B
4
Posts: 19
Reputation: 240

Post » Sat Mar 29, 2014 12:28 am

I think Ashley had a tutorial about this part. It explained that principle where you can make an enemy sort of "patrol" and I think that is what you are after. It is the platformer tutorial.

Essentially, however, what you do is create 2 sprites (just any colored squares would work) and place them exactly at the two points where your ball should move back and forth just like the below:

* o * (the 2 square sprites would be the * and the ball is the o)

Next you would add the bullet behavior to the ball (or the 8 direction movement and restrict it to 2 directions).
You would want a condition then checking if the ball collides with one of the 2 sprites and add an action to reverse the direction of movement of the ball.

I believe that should solve the problem.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Sat Mar 29, 2014 12:58 am

The easiest way and without any conditions or actions would be the sine behavior added to the object , the manual will explain it quite well.
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499


Return to How do I....?

Who is online

Users browsing this forum: Bootfit, brunopalermo, grigrizljac, korbaach and 16 guests