The Daily Click ::. Forums ::. Klik Coding Help ::. Float Scrolling
 

Post Reply  Post Oekaki 
 

Posted By Message

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
1st July, 2009 at 11:35:05 -

id like to do a scrolling style but have no idea how to go about it.

i want the screen to scroll out in front of the movable character and when the player changes horizontal direction (left right) the scrolling to pan out in front of them.

so if the character is running to the right the scrolling would be out in front a specific ammount and if they start running the opposite direction it pans to the other side out in front of the character (not immidiately, but fast enough so its not too slow)

any ideas?

edit: the best example i can give atm is iji. although the distance the screen scrolls out in front is very small in iji. im trying to achieve a larger distance as to hinder the players view behind them. also the speed that the scrolling pans in iji is much too slow for me.

Edited by Cecilectomy

 
n/a

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48488

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
1st July, 2009 at 11:57:51 -

This is actually fairly straightward. You position the window in relation to a players alterable value, then when he faces a certain direction, you add to that value. Example:

ALWAYS:
Centre display at X "Player Object" + Alterable Value A (horizontal scrolling)
Centre display at Y "Player Object" (standard, non-edited vertical scrolling)

Player faces RIGHT and Alterable Value A is LOWER than, say 40:
Add 1 to Value A (double this to make the scrolling faster)

The above event moves the screen to the right while keeping the player contained within.

Player faces LEFT and Alterable Value A is GREATER than, say -40:
Subtract 1 from Value A (double this to make the scrolling faster)

The above event moves the screen to the left while keeping the player contained within.


Thats it, really, is this what you were after?

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
1st July, 2009 at 12:09:28 -

fantastic! thanks chris.

ill use that for vertical panning as well (looking up and down)

 
n/a
   

Post Reply



 



Advertisement

Worth A Click