Meteor Shower to random landing with capx

Get help using Construct 2

Post » Sun Dec 01, 2013 7:59 am

Hi everyone,

I want to achieve something like a meteor shower where the objects are generated at a random position above the screen, than moves towards a random location at the bottom of the screen.

Creating them at random location is easy enough, but the problem I have is how do I get them to move towards a set of random location. I tried custom movement...but I am unable to achieve it. I can do it with pathfinding, but it is resource expensive. Is there a more efficient way to do it?

My capx is below for you to better understand what I am trying to do.
https://www.dropbox.com/s/cs1e1l78sjokktx/MeteorShowerTest.capx

Thank you.
B
42
S
20
G
31
Posts: 685
Reputation: 20,221

Post » Sun Dec 01, 2013 8:08 am

You could create a random go to 'Location' as you did when creating the spawn point then just use Set Angle Toward 'Location'plinkie2013-12-01 08:23:07
B
45
S
15
G
73
Posts: 2,002
Reputation: 43,386

Post » Sun Dec 01, 2013 8:22 am

Here, I tweaked your file - > Link
B
45
S
15
G
73
Posts: 2,002
Reputation: 43,386

Post » Sun Dec 01, 2013 8:27 am

@plinkie

Thanks Plinkie. Haha Ok I solved it already. Apparently I had already solved it, just that I forget to set the speed and acceleration....so it appeared as if it wasn't moving.

Haha thanks to your clue, I noticed my mistake. Thanks!
B
42
S
20
G
31
Posts: 685
Reputation: 20,221

Post » Sun Dec 01, 2013 8:30 am

@plinkie

Thanks for the example Plinkie. That is another interesting way of solving it. Haha I guess there really is so many ways of doing things.
B
42
S
20
G
31
Posts: 685
Reputation: 20,221

Post » Sun Dec 01, 2013 8:31 am

Yep, good luck! :)
B
45
S
15
G
73
Posts: 2,002
Reputation: 43,386


Return to How do I....?

Who is online

Users browsing this forum: Mayfly and 8 guests