User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22

Thread: Very strange "rapid fire" problem

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Oct 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Very strange "rapid fire" problem

    I'm really stumped, and hoping someone has an insight.

    In my game, various weapons are fired from a turret on the right side of the screen- machine guns, lasers, etc.

    The "machine gun" fire and "laser" fire lines look very similar; they're basically:

    Conditions:
    Repeat while Player 1 pushes fire
    Weapon selection counter = (# for that particular weapon)
    "Launch Readiness" object = stopped (this object changes to different animations to temporarily disable firing in order to regulate the speed of different weapons firing)
    Ammunition for weapon >0

    Then:
    (Player object) launch object (bullet/laser) at speed 100
    Change (launch readiness object) animation to (launch machine gun/launch laser)
    Subtract 1 from (Ammunition for weapon)
    Play sample (gunshot/laser.)

    The only real difference between the two is that the "Launch readiness" animation for the laser is a tiny bit shorter.

    And yet, while the machine gun seems to always fire a steady stream of bullets without problems, the laser occasionally just stops firing for no apparent reason.

    It keeps making the sound effect. A counter I designed to tell me how many "laser beam" objects are on screen *says* the number is increasing. And I'm well below the maximum number of objects allowed. It just doesn't actually seem to create those laser beams, or if it does, they aren't moving (staying hidden under the player object) and disappearing a few moments later.

    Does anyone have any suggestions?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    First off, remove the launch readiness object.

    Then, insert a "Restrict actions" condition to the event (a screenshot of where to find that is below).


    Restrict actions.jpg

    Then type in the delay you want between each shot. That might help you fix your problem by changing the method of delaying the shots. If it doesn't, then you might need to provide us with a MFA file that demonstrates the problem. You don't have to upload the whole file. Instead, use "Save as" in order to make a duplicate file, and then remove every event other than the one event that is needed in order to demonstrate the problem. Then remove every object that isn't needed to demonstrate the problem. Then re-name the application to something that makes sense for the problem, which, in your case, would be something along the lines of "Rapid-fire problem".

  3. #3
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,824
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    You might need to upload the MFA file for people to take a look at.
    easier to look into whats going on.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Are you sure you havent reached that frame's max object limit? (Default is 500)

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, keep an eye on the object count in the debugger at the top left of the screen, and make sure you're destroying projectiles when they're far from the game window.

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Oct 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Um, I *did* say I was below the object maximum. Actually, I went so far as to increase the maximum number of allowable objects to 1,000, though it shouldn't be necessary: I'm rarely having even 100 objects on screen at once.

    I tried the "restrict actions" workaround, happygreenfrog; for whatever reason, it actually seems to make the problem worse.

    The most frustrating things about the problem are this:

    The "machine gun" works in almost exactly the same way, without error. The "flame thrower" even uses the same animation of the "launch readiness" object (the one difference being that the "flame" object self-destructs when its animation plays out, giving it a shorter range), also without error. It's just the laser that does this, and not consistently. Sometimes it will go entire play-throughs without this glitch even showing up! It seems to mostly show up when the laser is being fired in certain directions (about 15-20), but the player will often have need to fire in those directions.

    I'm a little concerned that I might just be "overloading" TGF2 in some way. The level as written has 197 lines in the event editor; I freely admit I'm not the world's most efficient coder (but then again, this level is the "template" for all other game levels, and some of the lines won't be necessary in all of them, so I can pick out some of them for each if need be.) If that's the case, though, I'm still baffled at how unpredictably that "overload" manifests itself.

    I'll upload the level soon if no one has any other ideas.

  7. #7
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Oct 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...And I just tried adding a "always move the 'laser beam' object to the front", in case what was happening was that the laser object was appearing but not moving from behind the "turret" object. No luck. As near as I can tell, though the game thinks the objects to be launched *are* being created (they increase both my "number of laser objects" counter and the "number of objects" in the debugger), they aren't appearing on screen or interacting with any other objects. (*sigh*)

    Thanks again for any suggestions; I do appreciate it.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    If you do what we suggested (upload a stripped-down copy of the MFA file), then we will be able to help you more.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yes, upload the mfa so we can see what's going on!

  10. #10
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Oct 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please don't use any portion of this file or its contents for purposes other than diagnosis.

    To access the laser, press '9' or scroll through weapons with the mouse's scrollwheel. The test starts the player with around 300 rounds of laser "ammo".

    http://dilbertfiles.com/?s=75f75f29-...f-e24783438604

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Strange "corruption" of objects
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 11th September 2013, 12:41 PM
  2. Strange behaviour with "Look in direction of"
    By JoKa in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 6th April 2010, 07:51 AM
  3. Bug: "Player Pressed Fire" Mix-up
    By Docilemouse in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th December 2009, 10:50 PM
  4. Rapid Fire problem
    By ZayLong in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th March 2009, 03:03 PM
  5. A very strange problem with the "Tray Icon" object
    By bearcub in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 22nd December 2007, 07:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •