The Daily Click ::. Forums ::. Klik Coding Help ::. Really good Scrolling
 

Post Reply  Post Oekaki 
 

Posted By Message

martinbonne7



Registered
  27/08/2003
Points
  8
2nd September, 2003 at 07:31:19 -

How is it done?

 
hahahahahaha chortle

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
2nd September, 2003 at 07:47:53 -

1. Make the frame bigger than the window
2. Use the action 'Centre playfield at position'

 
n/a

Tom



Registered
  24/08/2003
Points
  300
2nd September, 2003 at 08:49:14 -

Never have a window size bigger than 640 x 480. Otherwise it will probably slow down quite alot.

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
2nd September, 2003 at 09:40:25 -

What a crap question. You should be more specific in future.

 
Image

martinbonne7



Registered
  27/08/2003
Points
  8
3rd September, 2003 at 07:17:31 -

yeah It was pretty crap of me, but I was in hurry.
What I meant was how do u make the screen center where your player is facing with out using a mouse aimer.

 
hahahahahaha chortle

Arf :: FPP Games



Registered
  15/05/2002
Points
  1364
3rd September, 2003 at 08:32:12 -

For a top-down viewpoint game, you can use trigonometry to do that if you know the angle the player is facing:

Always:
-Center display at X = X( "Player" ) + ( 100 * Cos( Angle( "Player" ) ) )
-Center display at Y = Y( "Player" ) + ( 100 * Sin( Angle( "Player" ) ) )

Change 100 to however far in front of the player you want it to focus. If you're using normal 32 direction movement you can work out the angle like this (although it might be quite jumpy):

Angle = (32 - Direction( "Player" ) ) * 11.25

If you're using TGF then you'd need to use the Advanced Math object to do the trig functions, and instead of 11.25 you could put ( 11 + ( 1/4 ) ). It's probably not worth doing in TGF though.

 
n/a

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
3rd September, 2003 at 09:16:11 -

well there isd an even easier way cause you can check a button in the window where you choose wich position it should scroll

 
Beware of life ...so far noone have survived it.......
   

Post Reply



 



Advertisement

Worth A Click