The Daily Click ::. Forums ::. Klik Coding Help ::. Fast Loop
 

Post Reply  Post Oekaki 
 

Posted By Message

Pyro



Registered
  22/05/2003
Points
  110
27th March, 2004 at 22:37:09 -

If I ever try to make an object's position stay with another object it always trails it a few pixels behind if the location moves too fast, can fastloop make the object stick to another no matter the speed?

For instance : always set "pistol" position to "man1". Except for "pistol" cant keep up with "man1".

I would check for myself but I don't know how to use fast loop and I only want to learn if it helps me with that.

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
28th March, 2004 at 06:55:40 -

i have this problem myself. using fastloop does notably reduce it but doesn't get rid of it entirely. use the event:

+User Holds Direction Key
-Start loop "setpos" for 100 loops

+On loop "setpos"
-Set position of object1 to position of object2.

however, do remove it further you might have to tewaek around with where you set its position e.g. "set x of object1 to x of object2 - 2" or something.

 
www.thenatflap.co.uk

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
28th March, 2004 at 07:19:05 -

Put the event where it sets the pistols position after the events where the player moves(This only works for custom movements though).

 
n/a

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
28th March, 2004 at 07:19:06 -

Arg! Sorry, I accidentally clicked reply twice.

Image Edited by the Author.

 
n/a

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
28th March, 2004 at 07:24:17 -

If one of the objects uses one of MMF's movements, there's nothing you can do as the object is positioned AFTER all of the events.

 
n/a

hey hey shoe



Registered
  23/05/2003
Points
  65
28th March, 2004 at 10:21:12 -

If you have a scrolling game, you'll notice that the gun doesn't have any latency while the player is in the middle and the screen is scrolling, only at the edges. If so, make the player start somewhere not close to the edges and make a wall or something so that you can't walk close to the edge of the screen

 
CHES!

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
28th March, 2004 at 11:43:36 -

Argh! Fastloop doesn't make things faster! It only does a number of events a number of times instantly. If you made your origional movement AND the other object on the same loop they should stay together.

Repeat whilst pressing right:
- Start loop right

On loop right
- Xpos of Player +1
- Set Xpos of object2 to player
- Set Ypos of object2 to player

 
n/a

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
28th March, 2004 at 12:18:19 -

... you dont even need fastloop to do this


Direction of character = RIGHT: Set position of gun to whatever, set its direction to right

Direction of character = LEFT: Set position of gun to whatever, and its direction to left

I ALWAYS use this method, I find it flawless, with no "lag"

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
28th March, 2004 at 15:12:40 -

strange, whenever i do that i always get "lag". should probs look at my events again.

 
www.thenatflap.co.uk

Deleted



Registered
  16/01/2004
Points
  32

VIP Member
28th March, 2004 at 16:19:40 -

Circy's method doen't work in inferior programs like TGF. Upgrade you cheap bastards.

 
n/a

Pyro



Registered
  22/05/2003
Points
  110
29th March, 2004 at 00:13:02 -

Most of what you guys said made sense, thanks.

 
n/a

Mr Icekirby



Registered
  18/12/2003
Points
  846
29th March, 2004 at 01:17:14 -

the reason there is a lag is because it moves to the position last shown, this will mean that it is 1 frame behind all the time that it is moving

 
Mr Icekirby says so!
OBEY ME!

Kramy



Registered
  08/06/2002
Points
  1888
29th March, 2004 at 13:11:44 -

Icekirby: That's true and not true.

It moves to the position last shown. -Yes
It is one frame behind everything else. -No

It would be positioned in the right spot, then everything redrawn. The problem is not using a custom platform movement.(as speed positions are hard to measure)

 
Kramy
   

Post Reply



 



Advertisement

Worth A Click