ZFGC

Resources => Coding => Topic started by: Mr. Star Fox on June 13, 2012, 03:53:18 am

Title: I need help coding...
Post by: Mr. Star Fox on June 13, 2012, 03:53:18 am
Okay so I have this code:
Code: [Select]
if global.indungeon=0{
vx = view_xview[0]
vw = view_wview[0]
vy = view_yview[0]
vh = view_hview[0]}

-This code sets the boundaries for the view to stay in, for scrolling purposes.
-The view size is 160x128
-"global.indungeon" is a variable that determines whether you're in a dungeon or not.

The problem is that I want to make it so when you are in a dungeon, the rooms are 240x176 and the view can move inside these boundaries, but I have no idea how I would set that up... any help?
Title: Re: I need help coding...
Post by: DaSpirit on June 13, 2012, 02:48:23 pm
I don't really understand what you want. Care to elaborate more?
Title: Re: I need help coding...
Post by: Aero88 on June 13, 2012, 04:11:02 pm
Are you using Game Maker?  If so why don't you just set the size of the room when you make the rooms for the dungeon?  Or perhaps you mean you want the view to be 240x176?
Title: Re: I need help coding...
Post by: Kami on June 13, 2012, 04:16:46 pm
Are you using Game Maker?  If so why don't you just set the size of the room when you make the rooms for the dungeon?  Or perhaps you mean you want the view to be 240x176?
You mean 256x176(Minish Cap Size)
or is what your saying for Lttp style;
Title: Re: I need help coding...
Post by: DaSpirit on June 13, 2012, 05:13:40 pm
It appears that you are using GameMaker.

If you simply want to move the view to center the player, you can simply do something of the sort:
Code: [Select]
view_xview[0] = obj_player.x - 160/2;
view_yview[0] = obj_player.y - 128/2;

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