User Tag List

Results 1 to 9 of 9

Thread: Launch or Create Object actually creates two of the object, not just one.

  1. #1
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)

    Join Date
    Oct 2011
    Location
    Oregon
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Launch or Create Object actually creates two of the object, not just one.

    So, I have a spaceship that fires bullets. Whether I use create or launch object, it creates two of them at a time, and I see no reason for it to do that. They're created right on top of each other so you can't visually tell, but this causes them to do twice the damage they're supposed to, animations only play on one of them, and obviously this adds to object count, which I'd like to keep to a minimum.

    Here's my code: (As far as I can tell, no code outside of this should have any effect on it at all.)

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Jun 2006
    Location
    UK
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try swapping the order of your last event, Launch the bullet after you set the value of fireweapon to 0 not before.

  3. #3
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)

    Join Date
    Oct 2011
    Location
    Oregon
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't change anything.

  4. #4
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)

    Join Date
    Oct 2011
    Location
    Oregon
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's exactly what I'm doing... except I used launch object in this case (makes no difference in the effect). The get value statements are essentially just alterable values, which control how quickly the weapon fires and which weapon is being fired(there are 5).

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried adding the condition, "Only one action when event loops" from the limit conditions menu?

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Add a "Run this event only once" condition and see if it still fires two bullets. If it only fires one, it means your launch event is being executed twice which I suspect is the case. Possibly you have another event somewhere interfering with the PLAYERfireweapon variable?

  7. #7
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)

    Join Date
    Oct 2011
    Location
    Oregon
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^ It still fires two. No difference whatsoever... except that it only fires them one time with that.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Jun 2006
    Location
    UK
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am still looking at this and thinking it's an event order issue..

    The event 'repeat while A is down' is constantly checking, which means as long as the PlayerReload is greater than the value it needs to be, it will keep triggering the event.

    In other words I think this happens -
    - PlayerFire becomes 1
    - You Fire
    - You set PlayerFire to 0, but you are still holding down A (remember this is constant, not done per loop iteration), and reload is above the required value so fire is set back to 1
    - You set reload to 0
    - Yet PlayerFire is still 1, so the event runs again
    - You Fire
    - This time you set fire to 0, and reload hasn't yet reached 200 again (or whatever value), so you don't get PlayerFire set to 1 again.
    - You set reload to 0

    Done..
    This is how I read the event? Could be wrong

  9. #9
    Clicker Multimedia Fusion 2

    Join Date
    Apr 2015
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having the exact same problem. Can someone help?

Similar Threads

  1. Launch Object Bug
    By Top_of_the_Temple in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th December 2013, 04:52 AM
  2. probleme create party & launch game
    By ptiseigneur in forum Lacewing
    Replies: 1
    Last Post: 28th March 2013, 12:04 PM
  3. Objects created away from the object that creates them? Using Box2d. (not Box2d2.0)
    By leightonw87 in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 29th February 2012, 11:51 AM
  4. Launch Object
    By Captain_Harris in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 11th October 2011, 06:24 PM
  5. Launch an object - use a calculation?
    By Kottis in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 12th September 2010, 03:35 AM

Posting Permissions

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