How do I create a "windmill" bullet pattern.

Get help using Construct 2

Post » Tue Apr 18, 2017 1:10 pm

Hi, i'm making a touhou style shoot em up and i was wondering if theres a surefire method to creating various bullet patterns, for now just a spiraling type windmill pattern would be amazing to add to my game, thanks!
B
4
Posts: 2
Reputation: 204

Post » Tue Apr 18, 2017 2:11 pm

You may want to check the store and see if there are any templates, however her is my 2 cents.

You definitely can do that. My answer is not going to be a simple copy and paste type, rather its suggesting how one would need to think in order to achieve what you ask.

First off one would need to think about the origin of the bullet and how its going to be generated. If it is going to be generated from a sprite that will be be twisting around then all you have to do is focus on the timing that each bullet is fired, and the speed of the sprite rotation, the environment in which you created will generate the pattern naturally (the generation from sprite and traveling in direction of angle of the sprite when generated.

If you want the bullets to generate from a object that generates bullets from random areas (basically there is no front facing location) then you need to focus on physics, not the physics behavior but physics the study of energy. One would have to tweak generate events that spawn bullets in different directions (angles), then focus on timing and speed. If I were to do this I would get an image of a 360 degree compass and imagine how many bullets I want to for the spiral I imagine. Then I would experiment with timing (the time between each bullet generated done with wait actions & create actions). If you try this you will find that the timing and angle are responsible for creating the spiral, the speed of the bullets I would focus on last, but I'm sure you'll reach a point where you'll be fine tuning all three to get the desired effect.

In short; Focus on generating the circle with angles > Focus on generating the spiral with timing > Finally use speed to generate the desired affect, slow if its enemy bullets you want the player to move around or fast for chaos. Then wrap it all up with a loop condition.

Take it one step at a time, if it sounds intimidating it just because you didn't start yet.
B
16
S
7
G
5
Posts: 30
Reputation: 3,777

Post » Tue Apr 18, 2017 5:15 pm

Building on @GOObGONE 's answer:

Create a sprite, call it spawner.
Add the rotate behaviour to it and give it a value
Add the timer behaviour.
Add an instance variable "shoot" to the spawner and give a value for how often you want the spawner to shoot a bullet.

Create another sprite, call it bullet. Add the bullet behaviour to it.

Add the following code to your event sheet:

On (choose a trigger) set timer "shoot" to spawner.shoot (continuous)

On timer "shoot" : spawner| create bullet;
bullet|set bullet angle of motion to spawner; (make sure you use the bullet behaviour action here)

On (choose a trigger): stop timer "shoot".

You can then adjust the spawner rotate speed & direction and shoot variable, and the bullet speed to vary the pattern.
Use whatever triggers you want to start and stop the spawner.

For some variety try adding the sine behaviour to the spawner and use the angle, vertical or horizontal settings to move the spawner. Remember to remove/stop the rotate behaviour before doing this or things might go a bit weird - or maybe that's what you're after! ;)
B
22
S
9
G
4
Posts: 476
Reputation: 4,327

Post » Tue Apr 18, 2017 10:48 pm

You can do an amazing amount of patterns with the built in behaviors.

https://www.dropbox.com/s/vf9ub4hq4r5cv ... .capx?dl=0
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Thu Apr 20, 2017 6:01 am

Thanks guys i have a working spiral of bullets now! i really appreciate it :DD
B
4
Posts: 2
Reputation: 204

Post » Thu Apr 20, 2017 6:34 am

GOObGONE wrote:You may want to check the store and see if there are any templates,

This is the LAST thing you want to do.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Post » Thu Apr 20, 2017 1:25 pm

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Thu Apr 20, 2017 1:58 pm

ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Thu Apr 20, 2017 3:25 pm

MPPlantOfficial wrote:
GOObGONE wrote:You may want to check the store and see if there are any templates,

This is the LAST thing you want to do.


Thanks for the heads up.
B
16
S
7
G
5
Posts: 30
Reputation: 3,777

Post » Thu Apr 20, 2017 4:31 pm

Also just a heads up. There is a bulletML plug-in in the store. This is the general standard scripting used for making the bullet patterns bullet hell shooters. I haven't tried it myself. But just FYI...
...
B
47
S
24
G
7
Posts: 356
Reputation: 8,318


Return to How do I....?

Who is online

Users browsing this forum: Bootfit and 4 guests