![]()
|
HUD Tutorial - miroki123This is just a quick guide of how to make a working HUD. First of all, there are some concepts you should know about HUD (everything detailed on HUD wikipage): Fields: Used to show numbers/text/graphics (can show also item/character graphics). Timers: Update HUD information (this concept is only for interfaces) or Global timer. Objects: Show a graphic stored on Effect resources. IMPORTANT NOTE: To access anything related to a HUD, it must be turned ON before everything. 1 - Making a common bar.A - Add a field. B - Set the field to Graph. C - Attach the retrieve value to whatever you want (character's HP for example) D - If you want the bar to have a fix maximum size, add also a maximum value (if you want a maximum value that is not fix, use retrieve max value) E - Set the orientation: vertical or horizontal bar. F - Set the orientation you chose to align LEFT (horizontal) or TOP (vertical), and set the one you didn't chose to CENTER. G - Adjust the size of the bar with Width and Height. F - Maintain the distance from the edge you're adding the field (for example, if it's on the upper left side, make edging LEFT and TOP). 2 - Making a pie bar.Same as before, except for the following: A - Horizontal and Vertical alignment set to CENTER. Orientation doesn't matter here. B - Width and Height must be the same (or it won't be a circle). C - You also must pick Start and End Angles. The left one is the minimum value, and the right one is the max. 3 - Making a rotating dial.Same as pie, except that Height must have a higher value than Width. 4 - Adding a text/number.A - Add a field and set as Text/Graphic, select your font. B - Retrieve the value you want (main character's weapon for example) C - If it's a number you may also want to set a maximum value. D - Align it so the text doesn't go off the screen (for example if you're placing the text on the right side, make it align to the right). E - Set vertical alignment to center. F - Align to the edges properly. 5 - Adding a graphic (items OR character faces).A - Add a field and set as Text/Graphic. B - Add the following code on retrieve value for ITEM: Item(Char("main").Equipment("Weapon")).Graphic OR the following code for character's FACE: Char("main").Portrait C - Don't change Width/Height if you want original size, for a higher size change them to equal numbers (ex: 256x256) 6 - Adding units counter (little hearts as HP).A - Add a field and set it as Units. B - Retrieve a value (character's HP to show one icon for each HP point of the character). Setting a maximum value will make missing units to be half-visible. C - Width and Height stabilish the number of rows and columns, respectively. 7 - Hide/Show automatically using timer:A - Create a timer, with initial/every interval = 40ms (or less for faster response, may lag). B - On Every Timer Tick trigger, add: -Comparison Branch, compare the first expression (X*) equal to None(""). *Replace X for: Current Vehicle, Current Turret, Current Equipment, etc) -In the first node (X = NONE), make invisible everything the player shouldn't see (Event_Change Invisibility = ON). -In the second node (X <> NONE), make visible everything the player should see (Event_Change Invisibility = OFF). |
|
|
|
Affiliates Action RPG Maker |