How do I create asteroid belt

Get help using Construct 2

Post » Tue Jun 27, 2017 5:28 am

ok here is my plan

i want to have 1 invisible object that will spawn asteroids in a arc shape
kinda like eve online

so in my space system i want spawn a few of there

but the numbers of asteroids may vary per belts
some may spawn 15 rocks while the others may spawn 30 rocks
and they all spawn different type of rock in each belt
so 1 belt can have 4 type and the other may have 7 types

can anyone make it as a c2 or c3 downloadable file for me please please :D
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Post » Tue Jun 27, 2017 1:49 pm

@kiugetski

Would this work for you?:

https://www.dropbox.com/s/y2e0x0lt4qwf4 ... .capx?dl=0

Tap any key to toggle motion.

You can add extra belts by duplicating the spawner object.

Set the variables on the spawner object to alter the belt's properties:

no = belt number - this will be assigned to the asteroids in that belt and is used to set the asteroid's frame no
eOriginX & Y = the origin points for the ellipse that the asteroids in that belt follow
spawnNo = the number of asteroids in the belt, determined by spawnMin/Max
speed = the speed of the asteroids around the origin
sizeMin/Max = limits of asteroid size
eAngleOffset = angle of the ellipse
angleMin/Max = limits for initial spawning of asteroids
bandWidth = band within which asteroids will spawn, added to ellipse width/height
eWidth/eHeight = ellipse size. Set these values equal for a circle

I cribbed heavily off this thread, so shout out and big ups to @R0J0hound and @cincipon:

viewtopic.php?f=147&t=80345&p=656028&hilit=ellipse#p656028
Last edited by mekonbekon on Tue Jun 27, 2017 10:28 pm, edited 2 times in total.
B
20
S
8
G
3
Posts: 458
Reputation: 4,055

Post » Tue Jun 27, 2017 6:51 pm

ty will study it
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Post » Thu Jun 29, 2017 8:57 am

hummm to create random asteroids you have to create many version of the same spawner ?
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Post » Thu Jun 29, 2017 10:45 am

Only one spawner per belt - it's a lot easier to handle than trying to create multiple belts from a single spawner
B
20
S
8
G
3
Posts: 458
Reputation: 4,055

Post » Thu Jun 29, 2017 5:04 pm

then how can i make it to spawn different types in one single belt
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Post » Thu Jun 29, 2017 5:12 pm

i think if i make it spawn a container instead and then work on that container to spawn a diff asteroid i think its my best solution
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Post » Thu Jun 29, 2017 7:51 pm

If you want different types in one belt you can add different animation or frames to the asteroid object and use the "choose" expression to pick a random animation/frame in the event where the asteroid is created.
B
20
S
8
G
3
Posts: 458
Reputation: 4,055

Post » Fri Jun 30, 2017 5:08 am

yeah i tought about it right afther and then do a frame check :P
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Post » Fri Jun 30, 2017 6:26 pm

ok hi all here is what i want to do
when im in range of the asteroid
i want to click on it so then a lazer animation will make a line between the spaceship and the rock :) how can i make it ?
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Next

Return to How do I....?

Who is online

Users browsing this forum: gskunk, newt and 47 guests