Hey, a buddy of mine got MMF2 (which I really like, I'm going to get it) and I've been using it to convert a game from MMF 1.5. I used Cellosoft's Fastloop object and need to convert to the built in fastloops. The problem I am having is that the cellosoft fastloop has the Loop Step action where you can manually move the loop to the next step, where MMF2 doesn't (as far as I can tell). The actions I'm going for are roughly this:
Object A overlaps object B
- Set dir object B to Val(List Select$( "Object Coordinates" )) <-- the list object holds numerical direction values 1-32
- Set X pos Object A to Current X Position + 32
- Set loop to current step + 1
Well I am guessing the "loop step" is just defining how many loops you do. So if you looped an event 100 times, with a step of 1, you would get 100 code loops, and if you had a step of 2 you would have 50 loops right? If that is the case you could have an infinite loop managed by a condition. Lets call counter 1 our predefined number of loops and counter 2 our step value, and counter 3 our actual loop value. You will want your loop event to occur when - (counter1*100)/(counter3)+1>100 I have multiplied by 100 here because it solves the problems with decimals. Also I have added 1 to counter 3 so that a) the final loop actually happens and b) stop division by 0. In that event you want to increment counter 3 by counter 2 to show that the event has taken place, and your new loop value gets incremented by your step value. Hopefully that makes some sort of sense, just to make it a bit easier to see
- Do looping events
- Add to counter 3 val counter 2
//step incrementing event
Object A overlaps object B (for example)
- Set counter 2 to val counter 2 + 1
//start loop event
On event that starts loop
-set counter 3 to 0
-set counter 2 to the step value
-set counter 1 to the number of loops
I am not sure if this method is necessary though, perhaps mmf supports the step feature?
You can set the loop index to loop index("nameofloop") + 1. (This is assuming that "loop step" sets the current step of the loop rather than how many times to run, though - I'm not certain which it was.)
Yes, DavidN makes more sense lol. You would have given each of your loops a name, so if you called a loop "loop1", on the event you wish to increment the loop step you will select fast loops > loop index from the special conditions, then you will be asked to insert the name of the fastloop you are referring to (in this case "loop1"), then you will be asked for the new value, which is just LoopIndex( > Enter string here < ) +1, where you replace the > enter string here < with the name of your loop.
Hey thanks for the replies. I was hoping to use the Loop Index ("Name of Loop") +1, but it says it contains mixed numbers and variables or whatever, because it classifies the "name of loop" as text but the +1 as numerical.
I think I need to play around with it some more, because now I'm having more problems with MMF2 not moving to the next line on the list object I'm using and acknowledging the data in that line, so my problems run deeper than just the fastloops. Ugh this sucks. The game was basically finished until I opened it in MMF2, now this is all f'ed up. Maybe I'll just go back to 1.5 and finish it in there :\
I think he is trying to skip a loop by the looks of it. LoopIndex("name of loop") +1 works. It is a bit picky about the syntax. Maybe you entered it into the loop name rather than the value? I have just demonstrated it on an always event in this file http://www.acecs.plus.com/fastloop.cca