ZFGC
Resources => Coding => Topic started 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?
-
x=view_xview+whatever
y=view_yview+whatever
usually there's a subtle lag when the view moves when using objects
-
it isn't working..they just sit there =(
-
is it in the step event?
-
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
-
must be something to do with the rest of your code
-
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.
-
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...
-
Yeh I recommend you use sprites. They take alot of hard work BUT IT'S WORTH IT IN THE END!
-
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
-
Your welcome (I'll when my screenshots are done, i'll send you a pic of my game)