ZFGC

Resources => Coding => Topic started by: MG-Zero on April 14, 2006, 02:57:43 pm

Title: [Request / Listing] Scrolling Hud.. (Game Maker 6.1) FIXED
Post by: MG-Zero on April 14, 2006, 02:57:43 pm
How can I make my huds scroll with the window when Link moves?  I know I can use drawsprite blah blah blah but i've already set all by huds up as objects and I don't want to change them.  So how can I get the window to follow Link..but have the Huds scroll with him?
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: Windy on April 14, 2006, 03:12:49 pm
x=view_xview+whatever
y=view_yview+whatever

usually there's a subtle lag when the view moves when using objects
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: MG-Zero on April 14, 2006, 03:16:26 pm
it isn't working..they just sit there =(
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: Windy on April 14, 2006, 03:23:50 pm
is it in the step event?
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: MG-Zero on April 14, 2006, 03:25:07 pm
umm no, lemme go changify that..

EDIT: Ok, they scroll now but they're constantly creating themselves and leaving behind a trail of hud objects O_o
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: Windy on April 14, 2006, 03:27:57 pm
must be something to do with the rest of your code
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: King Tetiro on April 14, 2006, 03:34:04 pm
i make a controller for everything that's not to do with Hero/Enemies/Etc and I did the draw sprites in the draw event and it worked, if you like, if you send it to me, I'll see what the problem is.
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: MG-Zero on April 14, 2006, 03:36:59 pm
i make a controller for everything that's not to do with Hero/Enemies/Etc and I did the draw sprites in the draw event and it worked, if you like, if you send it to me, I'll see what the problem is.

well thats the thing, i'm not using sprites, i'm using objects.  My huds work by changing the image_index when you select an object to be equipped and then it checks to see what image_index is set and uses a weapon based on that.  So to change my engine to work on sprites would be a bit of a pain...
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: King Tetiro on April 14, 2006, 03:39:48 pm
Yeh I recommend you use sprites. They take alot of hard work BUT IT'S WORTH IT IN THE END!
Title: Re: Scrolling Hud.. (Game Maker 6.1)
Post by: MG-Zero on April 14, 2006, 03:44:51 pm
oh oh oh, I got it =)  I put a "jump to position" command on the step event and set the coordinates to view_xview + blah and view_yview + blah.  Thanks for your help guys..never would have thought of the step event on my own O_o
Title: Re: Scrolling Hud.. (Game Maker 6.1) FIXED
Post by: King Tetiro on April 14, 2006, 04:15:11 pm
Your welcome (I'll when my screenshots are done, i'll send you a pic of my game)

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