The Daily Click ::. Forums ::. Klik Coding Help ::. Code causing freezes, need help with checking it
 

Post Reply  Post Oekaki 
 

Posted By Message

Greasy



Registered
  15/02/2005
Points
  322
6th November, 2008 at 13:24:59 -

I've got a custom platform movement thing here, but it seems to freeze the game when I touch the left arrow key. I can't find the problem, so i need some help.

Image

Image Edited by the Author.

 
n/a

nim



Registered
  17/05/2002
Points
  7233
6th November, 2008 at 13:43:03 -

You can't run a Fast loop a negative number of times, and that's what is causing the freeze. When you move left you're setting Alterable Value B to be negative and then running the loop. Instead, when you run the loop for moving left, use:

Start loop "left" Abs(Alterable Value B("Player 1")) times

Image Edited by the Author.

 
//

Greasy



Registered
  15/02/2005
Points
  322
6th November, 2008 at 13:45:14 -

hahah yeah thanks, I just noticed now.

 
n/a

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
7th November, 2008 at 23:36:56 -

Succestion use PMO instead of custom fastloop movement, or if you need fastloop movement, take it out of fastloop. Because it is not good to have many fastloops in games.

 
I have proven new mathematic formula to be true...

2D > 3D

Image


aphant



Registered
  18/05/2008
Points
  1242
8th November, 2008 at 00:34:19 -


Originally Posted by NeoMonkey
Succestion use PMO instead of custom fastloop movement, or if you need fastloop movement, take it out of fastloop. Because it is not good to have many fastloops in games.



3 fastloops isn't a lot. From what I know, things start to break when you're pushing something around 1000 fastloops.

 
   

Post Reply



 



Advertisement

Worth A Click