Hi All,
Has anyone got any advice or examples of fast loops being used on an active that can basically move in all directions?
I've tried going through it using davidn's platform fast loops but having a few issues, with it not being a platform game.
Printable View
Hi All,
Has anyone got any advice or examples of fast loops being used on an active that can basically move in all directions?
I've tried going through it using davidn's platform fast loops but having a few issues, with it not being a platform game.
A fast loop is a fast loop. What are you trying to do in it?
Your question is a little bit vague for me.
Sorry basically I want to check for collisions, like in the davidn platform tutorial.
I have a invisable box surrounding my character and I just want it to check for collisions instead of just the active which gets stuck on objects.
I want the character to be able to move anywhere he wants. However I do have it where if you stop holding up, the character slowly falls back to ground.
I imagine i'm thinking its more complicated than it is, especially as there are no reason for jumping or performing many other actions.
Do you mean a top down 4 direction movement?
When the left key is pressed start a loop for how many pixels fast you want the player to move.
repeat while left key pressed
-start loop "move left" however fast you want player to move.
onloop "move left"
+player NOT overlapping obstacle
set player X position to player x position -1
when player object overlaps an obstacle active then stop the move loop and reposition the player object back 1 so its no longer overlapping.
onloop "move left"
+player overlapping obstacle
stop loop "move left"
+set player X position to player x position +1
Do the same for right, but +1 to position and -1 on collision
and the same for up and down, only use y positions.
Also you can use qualifiers to group different obstacle actives together. So you would have
+player NOT overlapping obstacle.group etc.
Thankyou. I will try this later.
I did figure it out another way without using fastloops but i will also try your fast loop way as well to see if it works better =)
Quote:
Originally Posted by Bigfoot
Made a quick example for you.
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=229623#Post2296 23
What a legend!! Thanks mate.