The Daily Click ::. Forums ::. Klik Coding Help ::. Lagging camera
 

Post Reply  Post Oekaki 
 

Posted By Message

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
8th August, 2011 at 16:36:58 -

Hi,

I've been trying to replicate the lagging camera effect in EE&Zs scrolling engine (TGF) but there is too much extra code related to other functions (camera lock, metroid doors, PMO, etc) for me to follow exactly what is happening there.

If somebody who understands it could simply reproduce lag effect for me that would be amazing.

Image

I have linked a mfa file containing a simple level, no code and the Player, Camera and Scroll To objects.

If anybody can help me, I will be eternally grateful! Default platform movement please. (I know it is horrible, but it will make everything easier to follow)

http://www.whenthereisnoroominhellthedeadwalktheearth.com/MMF/pleasehelp.mfa

Thank you in advance!

Chris

 
n/a

nim



Registered
  17/05/2002
Points
  7233
8th August, 2011 at 17:37:23 -

I always use:

Always -
Set X Scroll to: X( "player" )-((X( "player" )-(X Left Frame+((X Right Frame-X Left Frame)/2)))/1.1)
Set Y Scroll to: Y( "player" )-((Y( "player" )-(Y Top Frame+((Y Bottom Frame-Y Top Frame)/2)))/1.1)

Just change "player" to the name of your active object. Hope this helps.

Edit:
Example: http://www.box.net/shared/2yyn31ypemdirv48khsg

Edited by nim

 
//

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
8th August, 2011 at 18:38:17 -

Yes! Perfect! Thanks Nim!

 
n/a

Duncan

Thelonious Dunc

Registered
  18/05/2002
Points
  552

VIP Member
8th August, 2011 at 19:53:51 -

Having that...

 
n/a
   

Post Reply



 



Advertisement

Worth A Click