The Daily Click ::. Forums ::. Klik Coding Help ::. quick question
 

Post Reply  Post Oekaki 
 

Posted By Message

zharkman



Registered
  01/03/2009
Points
  27
4th March, 2009 at 13:58:54 -

any way to make the play area move? i have my scenario byt the size of 3200 x 480
but when i get to the border, the frame wont move, any way to do this? im using the plataform movement

 
none

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
4th March, 2009 at 14:03:05 -

I don't know exactly what your asking, but if you want the frame to be able to scroll indefinitely set the virtual width and height to -1, those parameters can be found in the frame properties under the settings tab.

 
n/a

zharkman



Registered
  01/03/2009
Points
  27
4th March, 2009 at 17:13:12 -

mmm lets put it this way, the square, shows what u can see in the frame, i want it so u can see the rest, whatever is right out of that box, kuz my side scroller, goes as far to the right as it can, so it gets out of the frame, and the view doesnt follow my player

 
none

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
4th March, 2009 at 17:27:28 -

in the event editor, there is the icon that looks like a game board, theres an option in there called scrolling, you can set that to the player, or get creative and do something like setting the frame to a new object, give it bouncy ball and have it look at the player (so the screen kind of lags and give the image of a camera man trying to follow the player), theres a bunch of stuff you can do to make it interesting.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
4th March, 2009 at 22:26:41 -

Yeah, like UrbanMonk said, you'll need to use virtual height and width to do this, because the window will only scroll within the virtual height and width, which by default is the same as the frame height and width. If you aren't using MMF2, or even if you are, it would really just be easier to resize the frame.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
4th March, 2009 at 22:38:59 -

Shut up FOO'S!
Stop talking about virtual sizes, he means simple scrolling!

DO THIS:
As Miss Cakes said, under storyboard controls (in the event editor) use the "Scrolling"-events. The simplest one being "Center window position in frame -> at 0,0 from "Player"."

A basic event for pure, simple scrolling would be the following;

Always --> Center window position in frame at 0,0 from "Player".

Then the "camera" will always center on the player.

I pity the FOO who talks about virtual sizes...
I PITY DA FOO!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
4th March, 2009 at 22:41:05 -

Or for a smooth scrolling effect you can use linear interpolation.

First Create an object and name it "Camera" or whatever, then turn off "visible at start"
Also set the "Camera" object's movement type to static.

Then put this event into the event editor, assuming the object you want to follow is called "player"

Always
-Set X pos of object "Camera" to X( "Camera" )+(((X( "player" )-X( "Camera" ))*0.4)
-Set Y pos of object "Camera" to Y( "Camera" )+(((Y( "player" )-Y( "Camera" ))*0.4)
-Center Window Position in frame relative to "Camera" at (0,0)

And that's all there is too it!
Lets brake down the formula and see whats happening

-First we get the camera's x position
x("camera")
-Then add it to %40 of the distance between the player and camera-
((x("player")-x("camera"))*0.4)

-There is no need to get the absolote value here because if the numbers negative that means that the camera

is ahead of the player in which case the number needs to be negative to move backwards towards the player.

Heres a link to an older example I made of this
http://www.jsoftgames.com/FixedCam.zip

Oh and don't pity yourself so much EE

Edited by UrbanMonk

 
n/a

zharkman



Registered
  01/03/2009
Points
  27
5th March, 2009 at 00:24:38 -

EE is scawwy... T-T but he and cakes, knew what i was asking for, and urban monkey made it "smoother" thank you again

 
none
   

Post Reply



 



Advertisement

Worth A Click