OK. So here's the deal. My level loader seems to work....without using fastloops. But then it loads slow as hell. (The equivalent of saying "every 00'00'00": do X")
If I remove the fastloop events, it works. But when I add them in, it's as if the fastloop skips the events altogether. Am I just using the fastloops wrong? I guess I will reveal my code (!) so hopefully someone can help me out:
Fastloop object code:
Start of Frame:
List File: Load List File "levels\"+Str$(Global Value B)+".txt"
List File: Save List File WindowsDirectory$( "File" )+"\temp.lvl"
Trigger Loop #1 Once
Set Counter 1 to Global Value B
Loop Trigger #1
List File: Reset
List File: Load List File WindowsDirectory$( "File" )+"\temp.lvl"
Set position (Loading Object) to 112,0 (loading object is just an active object)
Start Loop #2 220 times
Loop Trigger #2
+ Loading Object is Overlapping Tile
Set direction (Tile) to Val(List Line Text$( "Object Coordinates", Loop Step( "Fast Loop object", 3)+1))
Set position (Loading object) to (Loading Object + 48,0)
Loop Trigger #2
+ X Position (Loading Object) Is >= 640
Set X Position (Loading Object) to 112
Loop #2 Position >=220
Stop Loop #2
I converted it over the best I could to the built in fastloop stuff but it won't work. It doesn't seem to recognize the "On Loop 2" condition or something. Anyone have any ideas? Anybody here trustworthy that I can send my source to?
I think that if you have multiple events for a loop, the first event will loop 220 times all at once, then after that the next event will loop 220 times, and so on.. ie. instead of going 1 - 2 - 3 - 1 - 2 - 3, it goes 1 - 1 - 1 - 2 - 2 - 2 - 3 - 3 - 3...
In the first Loop #2 event, try starting a new loop ie. "Loop #2 - Check" (1 time) and change the last 2 events to use "Loop #2 - Check".
Hernan, sorry the 3 was a mistake, I meant to type 2.
But here's the thing, I can't create an event like that anyway with the built in fastloops. It either says mixed strings and numbers or syntax error. So what I did it removed the whole loopstep part, and added an extra event to set the list object to the next line instead of all in one. But it doesn't work :| (with fastloops)
OK! I figured it out. It took a little creative coding, for some reason it didn't like that I was starting the loop and then activating the loading group. So instead I activated the group, then put a "run event once" condition in there that starts the loop, it works now. WOO! I was going to pull my hair out after a bit....