[XP]Gold Hud

Started by karldaylo, May 05, 2011, 01:19:46 pm

Previous topic - Next topic

karldaylo

 :^_^': sorry for the bother,
can i ask for any of you guys teach me how to put an hud for gold display

i wanted to learn it and put it in my game.. :)

so somtime soon.. iw ont be botherin you guys to ask how to put hud display for name,level, etc etc

thanks alot :)

ps: specially with the x and y's.. i know bt the locating number or X and Y, im only not sure where to put those and how to use it

thanks
RESPECT LIST:Blizzard, Game_guy, Foreverzer0, Winkio, Nathmatt

brewmeister

May 05, 2011, 04:34:29 pm #1 Last Edit: May 05, 2011, 04:37:44 pm by brewmeister
I assume you meant a gold window that shows on the map all of the time? (HUD)

This is an excellent first script-modification lesson. Good choice!

If you notice in the menu scene when you test play, the gold window is already there.
You just need to copy it to the map scene.

In Scene_Menu, find every line that has "@gold_window".   (5 places)
Use Cntl-F to bring up the "Find" dialog

Copy all 5 lines to the same respective location in Scene_Map

The first 3

    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416


go in the 'main' method, somewhere above the 'loop'.  Right below "@message_window = Window_Message.new"  is a good spot

The next one

    @gold_window.dispose


Also in the main method, but below the 'loop'.    Let's put that right after "@message_window.dispose"

And the last one

    @gold_window.update


in the 'update' method.  Right below "@message_window.update"    (seeing a pattern here?)   :)


Test it out.

It appears in the lower left corner, because that's it's position in the menu.


To reposition it,  just change the @gold_window.x = 0, and @gold_window.y = 416 to your desired position.

0, 0 is the upper left corner of the screen.   640, 480 is the lower right corner.
The origin of the window is the upper-left corner of the window.

So, right now the y=416 because the bottom of the screen is y 480, minus the height of the gold window (64)

To put your window in the upper left corner, set both x & y to 0

To put it in the upper right corner, set x to 480  (width of screen - width of window) (640 - 160),
and y to 0

Test again until you get the desired results

Be Well


karldaylo

May 06, 2011, 02:39:58 am #2 Last Edit: May 06, 2011, 02:50:30 am by karldaylo
I worked :) i thank you for that
thou its not the exact thing im llokin for,, since im not able to resize or remove the window of it :) but hey.. thanks i learned somthing... the first step to suceeding in rgss scripting :)

EDITED:  I APPRICIATE YOUR RESPONSE IN MY REQUEST :) most of ppl here are busy... and this is the only rpgmaker script and resource forum that i ussually go. im not sue how to request to other forum so ,... thanks for not ignoring :) lvls up
RESPECT LIST:Blizzard, Game_guy, Foreverzer0, Winkio, Nathmatt