The Daily Click ::. Forums ::. Klik Coding Help ::. Problem with parallax layer not wrapping
 

Post Reply  Post Oekaki 
 

Posted By Message

Benny Lindberg



Registered
  08/11/2010
Points
  54
10th November, 2011 at 17:26:42 -

Hi there! I have a layer with the x-coefficient of 1.25, and a quick background objective that is the length 320 pixels, which is the window width. I tried setting the virtual width to several different values, but the object doesn't wrap around when it starts to leave on the left side or right side. I made sure that the "wrap around" was checked.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2011 at 14:24:01 -

Noone's got any ideas on this? :/

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
18th November, 2011 at 16:50:56 -

hmmm that is strange, perhaps wrap around doesnt funtion correctly due to the scrolling. What i would do is make a bigger background and then it will move around but not end on screen.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2011 at 17:45:52 -

You mean the scrolling backdrop should be larger than the window?

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
18th November, 2011 at 23:37:38 -

Yeah, i believe you need to make the background 1.25 times the size of the screen to take into account the x co of 1.25. this way it will scroll without ending abruptly.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
19th November, 2011 at 11:58:43 -

Hm,no, that didn't solve it :/

 
n/a

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
21st November, 2011 at 07:44:47 -

Hmm, I havent tested but maybe the "wrap around" attribute applys to the entire frame size rather than the window size. So if your level is 2000 x 2000 px it would wrap that whole area rather than just your 320 x 240 px window?

 
dont make me divide by zero...

nivram



Registered
  20/07/2006
Points
  171
21st November, 2011 at 09:54:28 -

Maybe set the virtual frame size to -1?

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

Benny Lindberg



Registered
  08/11/2010
Points
  54
21st November, 2011 at 11:08:47 -

virtual frame width is -1. I don't think the height ought to matter, since it's only scrolling sideways. Hm, so it has to be the size of the complete frame, eh? I'll try that!

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
21st November, 2011 at 17:52:35 -

Yeah, that seemed to do it. Thanks!

 
n/a

nivram



Registered
  20/07/2006
Points
  171
22nd November, 2011 at 16:34:15 -

Glad to help Benny and glad that solved your problem.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm
   

Post Reply



 



Advertisement

Worth A Click