Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Dealing with multiple enemy shots?

    Beginners
    8
    37
    1757
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SteveZX81
      SteveZX81 F @Dave last edited by

      @Dave said in Dealing with multiple enemy shots?:

      Mornin' @SteveZX81! I just shared a program called "particleLaser Sprites" which gives detailed comments on every section.

      It's not doing any collision with enemies, but there is a commented out example for where the collision code would be.

      Hope it helps mate, let me know if I can expand on anything in there.

      oh Dave, you're too good to me! Thank you.

      1 Reply Last reply Reply Quote 1
      • BildoCZ
        BildoCZ @Dave last edited by

        @Dave Hi Dave. Where did you share "SpreadLaser Sprites"

        1 Reply Last reply Reply Quote 0
        • Martin
          Martin Fuze Team last edited by Martin

          Back then it would have been a user share as we did not have community sharing. If @Dave still has it then maybe he could re-share using an ID now?

          1 Reply Last reply Reply Quote 0
          • SteveZX81
            SteveZX81 F last edited by SteveZX81

            @BildoCZ I might still have it, I'll check my Switch watch this space.

            Edit: I do have it and I have now submitted it, the code is UQP63MNF6D but give it a few hours to clear the 'pending' state.

            waldron 1 Reply Last reply Reply Quote 1
            • Dave
              Dave Fuze Team last edited by

              @SteveZX81 - Life saver. I deleted the program recently as I was cleaning up my projects (I tend to make a lot to test individual things).

              Hope it helps @BildoCZ ! Let me know if you need anything

              waldron 1 Reply Last reply Reply Quote 1
              • waldron
                waldron F @SteveZX81 last edited by

                @SteveZX81 just downloaded it, looks good love the comments should be able to use this for my program hopefully

                1 Reply Last reply Reply Quote 2
                • BildoCZ
                  BildoCZ last edited by

                  Thx all.
                  I'm a beginner in FUZE. But I used to work in Game Maker. :)

                  1 Reply Last reply Reply Quote 2
                  • waldron
                    waldron F @Dave last edited by

                    @Dave so i'm using the laser program for my scrolling top down game to get my plane to shoot but i cant get the y axis movement working? apart from that it works great.

                    Dave 1 Reply Last reply Reply Quote 0
                    • Dave
                      Dave Fuze Team @waldron last edited by

                      @waldron Y axis movement of the bullets you mean? I'll hae to check the program again as i've forgotten the details. Will download now

                      1 Reply Last reply Reply Quote 0
                      • Dave
                        Dave Fuze Team last edited by

                        Hmm - the example doesn't use sprite properties to their best effect at all. It'll work, but it should really be using the properties of the sprites properly. I'll whip up another example a bit later and post the share code on this thread.

                        waldron 2 Replies Last reply Reply Quote 0
                        • waldron
                          waldron F @Dave last edited by waldron

                          @Dave no the bullet direction is fine its just the ship movement i'm having trouble with the up and down movement tried all sorts

                          1 Reply Last reply Reply Quote 0
                          • Dave
                            Dave Fuze Team last edited by

                            Give it a share and message me the share code if you like @waldron

                            Is it after adding the other code that the y axis movement stopped working, or are you y et to actually have it working as you wanted?

                            1 Reply Last reply Reply Quote 0
                            • waldron
                              waldron F @Dave last edited by waldron

                              @Dave so the player controls for that one is

                              plr.vel += {j.lx,0}
                              plr.pos += plr.vel
                              plr.vel += *= 0.9``
                              i tried j.ly but it just go's diagonal lol
                              1 Reply Last reply Reply Quote 0
                              • waldron
                                waldron F last edited by

                                cant get either of these scrolling

                                1 Reply Last reply Reply Quote 0
                                • Dave
                                  Dave Fuze Team last edited by

                                  And you've definitely tried the

                                  plr.vel += {j.lx, -j.ly} // must be negative y to move up the screen properly
                                  

                                  Could be weirdness happening with sprite camera, is that what you're using to scroll?

                                  I would recommend using the sprite poperties rather than ther player structure from the program instead. So just this for the setup:

                                  plr = createSprite()
                                  

                                  And then for the controls:

                                  plr.x_speed += j.lx * speedMultiplier
                                  plr.y_speed -= j.ly * speedMultiplier
                                  plr.x_speed *= 0.9
                                  plr.y_speed *= 0.9
                                  

                                  See if that changes anything. I wrote that demo for Steve before I really knew how t use the sprite properties to full effect. To be honest, it shouldn't make a difference. Hard to know what exactly is going wrong without seeing the code.

                                  waldron 2 Replies Last reply Reply Quote 0
                                  • waldron
                                    waldron F @Dave last edited by

                                    @Dave cheers i tried the -j.ly but not in the same bracket, yeah im using an invisible sprite set to move up its proving to be a royal pain but really want to run the program this way. i'l try that code and see what happens ;) thanks again

                                    1 Reply Last reply Reply Quote 0
                                    • waldron
                                      waldron F @Dave last edited by

                                      @Dave beautiful movement works, but now the bullets problem when scrolling.
                                      can i set a sprite at the top of the screen moving the same speed as the camera sprite but set that to removesprite bullet?

                                      1 Reply Last reply Reply Quote 1
                                      • M
                                        Maxwello F last edited by

                                        If I remember rightly (from somewhere) you had set the bullets to travel something 15 or something, can that be made variable based on your y position from centre to fix the issue (from what I saw on the vid) of the bullets not travelling as far as they should?

                                        waldron 1 Reply Last reply Reply Quote 1
                                        • waldron
                                          waldron F @Maxwello last edited by waldron

                                          @Maxwello at the moment the bullets are set at a distence of -200 which removes them at that distance, so iv increased that to -2000000 lol and increased the amount of bullets to 2000000 lol it works but will definitely cause problems some where down the line.

                                          if i can figure out to do it as you quoted that would work, the actual player sprite firing moves so if i set it at -300 that would be enough

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            Maxwello F last edited by Maxwello

                                            Make it - 200 + gheight/2 - y.pos or something maybe
                                            Sorry I'm so vague I barely get near my switch lately and I'm a bit dizzy today lol

                                            waldron 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post