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: [GM7]Link in center of screen  (Read 889 times)

0 Members and 1 Guest are viewing this topic.
[GM7]Link in center of screen
« on: May 06, 2007, 10:54:53 pm »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
I dont remember which engine but one had a few line of code that made link always in the center of the screen can anyone help me do that ?
« Last Edit: May 18, 2007, 08:31:15 pm by 4Sword »
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog

Goodnight

Once and future Captain
Re: [GM7]Link in center of screen
« Reply #1 on: May 07, 2007, 03:48:08 am »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
Manual view following... not too hard. These are the GM6 codes though, I hope they haven't changed in GM7.

Go to the room editor, and where it says "Follow object" or whatever, set it to None.

Then at the end of Link's Step event, put this:
Code: [Select]
view_xview[0] = x - view_wview[0]/2;
view_yview[0] = y - view_hview[0]/2;
The view's x becomes Link's x, minus half the view's width.. repeat for y.. keeps it pretty much centered.

[edit]
BTW sorry I haven't been on Messenger much. Most of the day is too busy  >,<
Logged
Re: [GM7]Link in center of screen
« Reply #2 on: May 08, 2007, 09:56:27 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1635
I hate to be a nagging ass, but remember that the offset might not be in the direct center of the sprite - just take that into consideration. Add or subtract whatever extra 10-20 pixels you might need for thi.
Logged
Pages: [1]   Go Up

 


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



Page created in 0.012 seconds with 40 queries.

anything