How do I do different bullet patterns

  • Hi all,

    I'm currently working on a bullet hell game i've been reading and searching a lot online for different bullet patterns in other games.

    I need some help on some of the patterns which i have been trying to create but i can't seem to do it.

    1) Bullet Movements - Is there a way where i can have the bullet behave this way? Travel X distance > Stop > Then travel again

    [SOLVED]2) Bullet Bursts - Have a single bullet bursts into 50 bullets in all directions IE 360 degrees? Or do i have to create like 50 imagepoints on that 1 single bullet? But that doesn't seems to be the correct way to do this.

    3) Have a sprite move along a straight line and have it spawn a row of 20 stationary bullets then after X seconds have the bullets travel and accelerate in X direction, X distance and X speed

    4) How do i have a sprite to shoot bullet A 3 times > stop > shoot bullet B 2 times > stop > shoot bullet C 4 times > stop. Something like a script to tell my sprite on when to shoot, what to shoot, how to shoot.

    I'm hope i'm clear on what i'm trying to explain here and i have attached a link before on what i meant be bullet bursts

    youtube.com/watch

  • An idea for your second question

    https://drive.google.com/open?id=0BzXd1GMzUo9HeU5fSVhHVFNLa00

  • Thanks a lot mrcgkh

    This really solved one of my problems.

  • I added in one more question under number 4. Hope i can get some answers, can't wait to finish my game

  • bump for other solutions

    point 2 is solved. Anyone?

  • 1)

    condition oncreated

    wait x time

    set speed 0

    wait y time

    set speed 100 (example)

    3)

    condition oncreated

    wait x time

    create object

    wait x time

    create object

    wait x time

    create object

    etc.

    below that make another action with set angle, speed etc.

    4) dunno what do you mean

  • Hi Human,

    Thanks for the tips, will go try it out later.

    For point 4 its something like timed scripted thing whereby for example i want a sprite to fire a rifle 4 times then switch to a shotgun and fire 4 times then finally switching to a crossbow and fire 4 times.

  • you can create instance variable that changes fired projectiles

    1 is gun

    2 is bomb

    3 is laser

    4... etc.

    then use instance variable condition to choose which numbers summons what.

    after each attack object makes the instance variable is changed (you can use random(1,4) so it shoots randomly)

  • Human

    Thanks for the advice, let me go test out all your solutions and i shall report back

  • here is something that might give you a starting point

    https://onedrive.live.com/redir?resid=1 ... ile%2ccapx

    r211 beta

    (no comments in code yet and very rough)

  • So it's all right?

  • RamPackWobble

    This is really interesting, i'm trying to understand the logic and code behind all of those but i can't seem to match any. Sorry as i do not have any programming knowledge and all these seems very foreign to me.

    Will changing any of the numbers create a different pattern?

  • Human

    sielxm3d

    I have tried number 1 and 3 suggested by Human 1) works but 3 doesn't seem to work for me. I have tried the below and what Human has suggested but the bullet doesn't stay when spawned then move after X seconds.

    I have not tried 4) as suggest by Human yet

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Change "Set Bullet Enabled" to "Set Bullet speed to 0"

    Enabled makes Bullet behaviour working, nothing more.

  • in my version you have three main instance variables :

    ivDelay - so for example 0.1 means there will be a delay of 0.1 seconds before the next "burst"

    ivSpread - this is the angle between each bullet - so 2 will move the bullets at 2 degrees from each other

    ivNumber - the number of bullets

    so if, for the three variables above (in order) we set 1 , 90 and 4 : would give a delay of 1 second before releasing 4 missiles at 90 degrees.

    so ...

    ivDelay 1,1,2,2,3,3,999 (the 999 indicates we have got to the end of the list and ...)

    so first delay is one second, second "burst" would follow a second later, third 2 seconds after the second....

    basically by altering these instance variables you can produce many various bursts - angles, delays and number of bullets.

    Have fun

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)