How do I

Get help using Construct 2

Post » Sun Jul 26, 2015 10:38 am

Hello guys , could anyone help me out? How can I. make four objects move at the same time towards a particular point? Thanks
B
6
S
1
Posts: 44
Reputation: 484

Post » Sun Jul 26, 2015 11:31 am

you can do this easily with the "custom movement" behavior.
you can define the angle of motion for each object. (a little trigonometry will be helpful to define the angle you want)
then move all the objects at the same time by setting their speed in one event.

Maybe you need more explanation about calculating the angle :
your object is in (Xa,Ya) on the screen
the destination point is in (Xb, Yb) on the screen
the motion angle should be :
arctan((Ya-Yb)/(Xb-Xa))
B
8
S
1
Posts: 76
Reputation: 628

Post » Sun Jul 26, 2015 11:36 am

@yapiii thanks
B
6
S
1
Posts: 44
Reputation: 484

Post » Sun Jul 26, 2015 11:49 am

you're welcome
(there are 5 "i" at "yapiiiii" :) )
B
8
S
1
Posts: 76
Reputation: 628

Post » Sun Jul 26, 2015 12:42 pm

please can anyone help once more? I used custom movement behavior for an object and stepping mode of "horizontal then vertical " .The object is moving according to the set speed horizontally,while very slow when moving vertically.How can I make it move smoothly both horizontally then vertically?
B
6
S
1
Posts: 44
Reputation: 484

Post » Sun Jul 26, 2015 1:09 pm

i never used the stepping mode, so I can't help you much.
I have a solution but certainly not the simplest :
- disable stepping mode
- move your object horizontally
- add an event : if object.Y > {value you want} then set horizontal speed to 0 & vertical speed to {value you want}
B
8
S
1
Posts: 76
Reputation: 628

Post » Sun Jul 26, 2015 2:46 pm

@yapiiiii thanks, It did not solve it.
B
6
S
1
Posts: 44
Reputation: 484

Post » Sun Jul 26, 2015 3:07 pm

can you upload a capx?
what is the exact problem?
B
8
S
1
Posts: 76
Reputation: 628


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, dimitriosfl, InfiniteRockets, jkmalau, newday198913 and 17 guests