Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Request / Listing] Smooth camera script  (Read 1689 times)

0 Members and 1 Guest are viewing this topic.
[Request / Listing] Smooth camera script
« on: June 03, 2006, 04:46:10 pm »
  • ^This is my sprite comments char
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 226
 :D we all use views right? i'm tired to watch how the camera suddenly stops when link doesn't moves, and wait for link reach the bottom or top of the room so the view start following link. so whit this script all that will be solved.

-Smooths the view when this stops.
-Follow link in the x an y coordenates that we want
-is simple!

How to make it work:
-Make a view of any size(i'm using 304x240) that follows link object
-Add a Step Begin event on your link object
-Add this code to it:
Code: [Select]
view_xview[0]=(view_xview[0]*4+(x-152))/5//can X change coordenates to fit your game
view_yview[0]=(view_yview[0]*4+(y-120))/5//can Y change coordenates to fit your game
-Done

Now chek how the camera moves, is nice hu?
well you also can do the view(in this case 0) not follow any object because that script acts as a view but link will be always in the center, and if you go to the top,bottom,left o right of the room it will still be on ceter so you can see the background color(if you are using tiles, or bg, doesnt matter, you will see it anyways!)

Litium04
« Last Edit: February 10, 2012, 02:47:15 pm by Niek »
Logged



i'm working on:

I support and i'm part of the team of:

flyinrooster

Re: Smooth camera script
« Reply #1 on: June 05, 2006, 04:19:21 am »
hmm, quite handy. good job  ;D.
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.109 seconds with 41 queries.