So; I am a veteran clicker but i don't know so much about fastloops. One thing that's been bugging me is that i feel kinda retarded not knowing how to make a looped movement. I know the regular custom movement taht is laggy and buggy but capable of slopes but nov I've realised that there is more to it than the slopes. My problem is that there apparantly is not a single good tutorial on fastloops out there. I bet it exicts, but I can't find it. PLease help!
On loop "Move Up",
+Object overlaps backdrop: Move Object up 1.
On loop "Move Up",
+Object NOT overlaps backdrop: Stop loop "Move up".
This actually means that every loop, it's checking to see if it is, or isn't overlapping the backdrop. If it suddenly stops overlapping the backdrop mid-loop, the loop will cease and the object will stop moving up. This is used to avoid the "sinking" in platforms, because it means that you can have the player sink deep into the ground, and make a fast loop that always kicks the player back up and flush onto the platform.
I'll try to make an example for you if this was too hard to understand.
Actually i knew all that Brandon, but thanks a lot anyways. I was... wait a min. I HAVE an example somewhere deep in the vast mountains of unsorted files I think. HOWEVER I did NOT know it had to be on the top! Why?
If you want to move an object faster than 1 pixel per MMF loop (ie reading through the events and updating the screen once) it might end up inside or even passing through a obstacle before MMF gets around to checking for collisions.
With a fastloop you can get around that problem by still moving one pixel and checking for collisions but running the fastloop as many times as you like. All within a single MMF loop.
Fastloops are also useful when you don't know how much you need to move your object by. There are 2 main approaches to dealing with a movement (specifically collision detection)
1) move then push back: so imagine a player falling. When he hits the ground (or collision detector touches the ground), first of all you make the downwards movement stop, and then using a fastloop, you move the character up 1 pixel at a time until he is not sticking into the ground.
2) you may notice a problem with option 1: if you're player was falling really fast, he might miss the ground all together. One moment he is above a platform, and then he moves down 32 pixels and now he is below the platform. In this case we would prefer to move the character down 1 pixel at a time. So if I want to move my character down 32 pixels, a fastloop moves him down 1 pixel 32 times, and in the mean time I am able to check for collisions inbetween.
Personally I use option 2 with a slight twist: I move more than 1 pixel at a time, but just enough. This is much more efficient if I know it is safe to move 6 pixels down at a time or something like that.