User Tag List

Results 1 to 8 of 8

Thread: Loop Problem

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loop Problem

    This is not MMF2 Specific I cannot not get it to work in 1.5 either. I am sure it is an event error on my part....however,

    I am trying to basically make a row of the same objects move to the right until the right most object hits the side of the screen then reverse itself (Think Space Invaders). The loop function cannot seem to recognize a sub-requirement of leaving the play area:

    Start of Frame Set Global Value A to 10

    Always spread 0 to Alt Value A of Active1

    Always Do Loop "Active1 Pos" Active1 number of times

    On Loop "Active1 Pos"
    Active1 Alt Value A = Loop Index Count
    Active1 Leaves play area on Right
    Set Global Value A to -10

    On Loop "Active1 Pos"
    Active1 Alt Value A = Loop Index Count
    Active1 Leaves play area on Left
    Set Global Value A to 10

    Every 00"-30 Set X Pos of Active1 to Current X Pos of Active 1 + Global Value A


    I even have a counter on screen to show if the Global Value changes so that I can make sure that my movement was not messed up. It never changes so the 'Leaves the Play area" requirement is never being seen.....If I change the leaves play area to something like is inside play area it will recognize it. I have done this by adding a sound to the event instead of changing the movement. It makes the sound all day.

    Help

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loop Problem

    This is not MMF2 Specific I cannot not get it to work in 1.5 either. I am sure it is an event error on my part....however,

    I am trying to basically make a row of the same objects move to the right until the right most object hits the side of the screen then reverse itself (Think Space Invaders). The loop function cannot seem to recognize a sub-requirement of leaving the play area:

    Start of Frame Set Global Value A to 10

    Always spread 0 to Alt Value A of Active1

    Always Do Loop "Active1 Pos" Active1 number of times

    On Loop "Active1 Pos"
    Active1 Alt Value A = Loop Index Count
    Active1 Leaves play area on Right
    Set Global Value A to -10

    On Loop "Active1 Pos"
    Active1 Alt Value A = Loop Index Count
    Active1 Leaves play area on Left
    Set Global Value A to 10

    Every 00"-30 Set X Pos of Active1 to Current X Pos of Active 1 + Global Value A


    I even have a counter on screen to show if the Global Value changes so that I can make sure that my movement was not messed up. It never changes so the 'Leaves the Play area" requirement is never being seen.....If I change the leaves play area to something like is inside play area it will recognize it. I have done this by adding a sound to the event instead of changing the movement. It makes the sound all day.

    Help

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Posts
    302
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loop Problem

    leaving the play area i think only works with built-in movements. You will need to check if position X is greater than something (in this case the windows size) or lower than 0 perhaps?

    same with collides and overlaps. Collides only works with built in movements, while overlaps is a general condition.

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Posts
    302
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loop Problem

    leaving the play area i think only works with built-in movements. You will need to check if position X is greater than something (in this case the windows size) or lower than 0 perhaps?

    same with collides and overlaps. Collides only works with built in movements, while overlaps is a general condition.

  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)

    Re: Loop Problem

    Yes, use "X position > Frame Width" and "X position < 0" instead of the "Leaves the Play Area" events.

  6. #6
    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)

    Re: Loop Problem

    Yes, use "X position > Frame Width" and "X position < 0" instead of the "Leaves the Play Area" events.

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loop Problem

    I did not think about frame width. I ended up putting a border on the two edges. I merely made a thin black line for now and used a collide and it did what I wanted it to. However, I am going to try the width. I already knew that 0 worked so I am pretty sure the width will.

    Thanks for the responses,

    Wade

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loop Problem

    I did not think about frame width. I ended up putting a border on the two edges. I merely made a thin black line for now and used a collide and it did what I wanted it to. However, I am going to try the width. I already knew that 0 worked so I am pretty sure the width will.

    Thanks for the responses,

    Wade

Similar Threads

  1. Loop problem with counters and max (wrong value)
    By warlords in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 22nd August 2013, 02:35 PM
  2. On Loop Problem
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 31
    Last Post: 8th March 2013, 10:59 AM
  3. Music loop problem
    By EdibleWare in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 2nd January 2011, 12:46 PM
  4. Weird loop problem
    By Nick in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th May 2008, 11:35 AM
  5. Fast loop problem
    By ayejes in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th April 2008, 09:37 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
  •