User Tag List

Results 1 to 1 of 1

Thread: ForEach LoopFV bug

  1. #1
    Clicker Fusion 2.5

    Join Date
    May 2010
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ForEach LoopFV bug

    I was wondering if anyone could somehow help me with this. In my game, I use ForEach events to control the collisions of player projectiles and power-ups (so they pop out of enemies when they die and fall to the ground gracefully). However, I've run into a snag that doesn't seem likely for repair.

    I have my events set up like this:

    +"Fireball" is not overlapping backdrop
    +Vertical Velocity <6
    --"Fireball" Add 0.4 to Vertical Velocity

    +Always Start ForEach Loop: "Shoot 1" for object "Fireball"

    +On ForeEach Loop: "Shoot 1" for object "Fireball"
    --Start loop "Shoot 2" Abs(Vertical Velocity ("Fireball")) times

    +On Loop: "Shoot 2"
    -Pick object with fixed value=LoopFV( "ForEach", "Shoot 1")
    --Y( "Fireball" )+Vertical Velocity( "Fireball" )/Abs(Vertical Velocity( "Fireball" ))

    Now, here's the thing. Everything before and after this part work fine: the fireballs/power-ups do what they're supposed to when they collide with the environment. But, here's the problem: if there's a situation where there are a lot of objects being created and destroyed at once, after about several seconds, all events with a "LoopFV" condition become disabled for a few seconds and the fireballs/power-ups malfunction, and then goes back to normal. Said conditions seem to "switch" on and off after every few seconds or so. I have a part in my game where there's a laser being shot at the player and I used a laser method someone mentioned here to do it, and that method involves constantly creating and destroying the lasers while using fastloops to cut the layer when it touches walls.

    Matter of fact, this is a very easy bug to replicate, so here's a project file I whipped up as an attachment to illustrate the problem.

    During runtime, press Space to shoot fireballs. Notice that, after a small period of time, the fireballs stop moving after you shoot them. And then, after more time passes, the fireballs become "unstuck" and function properly again. This happens off and on constantly.

    Also make note of the active objects at the top of the screen. The red one is constantly being created and destroyed. If you remove the event that controls this (or set it to "Never"), the problem goes away. Also, try pressing Backspace during times where the problem does and doesn't happen. You'll notice that, if you do that, the objects either function permanently or malfunction permanently. And furthermore, if you add more red actives to be created and destroyed, the amount of time it takes for the "switch" to happen decreases.

    I really need some help on this. This is completely ruining my game and I think it'll only worsen if I don't figure this out.


    Edit: I was doing some experimenting and I noticed something peculiar with the fixed values. I used counters to monitor them, and I noticed that right when it starts happening, the fixed values for the objects as they are being created goes down. When they start going back up, the problem goes away.
    Attached files Attached files

Similar Threads

  1. Foreach and ID
    By TheFieryPlumber in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 25th July 2013, 03:54 AM
  2. Foreach
    By AndyH in forum iOS Export Module Version 2.0
    Replies: 10
    Last Post: 31st January 2012, 06:47 AM
  3. ForEach in swf
    By MJK in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 18th July 2010, 07:27 AM
  4. How do i do a ForEach
    By Spryz in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th May 2008, 12:45 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
  •