{"id":10014,"date":"2026-09-14T18:30:10","date_gmt":"2026-09-14T09:30:10","guid":{"rendered":"https:\/\/salgudiy.com\/js\/rpg-maker-mz-%ec%95%84%eb%9e%98%ec%97%90%ec%84%9c-%ec%9c%84%eb%a1%9c-%ec%b0%a8%ec%98%a4%eb%a5%b4%eb%8a%94-%ea%b2%8c%ec%9d%b4%ec%a7%80-%eb%a7%8c%eb%93%a4%ea%b8%b0\/"},"modified":"2026-09-14T19:40:37","modified_gmt":"2026-09-14T10:40:37","slug":"rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top","status":"publish","type":"js","link":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/","title":{"rendered":"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container has-pattern-background has-mask-background nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1248px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-bottom:30px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"92\" height=\"126\" alt=\"gauge fill to top\" title=\"gauge_fill_to_top\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2792%27%20height%3D%27126%27%20viewBox%3D%270%200%2092%20126%27%3E%3Crect%20width%3D%2792%27%20height%3D%27126%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill_to_top-1.gif\" class=\"lazyload img-responsive wp-image-10015\"\/><\/span><\/div><div class=\"fusion-text fusion-text-1 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>In this post, I\u2019ll show you how to create a gauge that fills up from bottom to top using a script in RPG Maker MZ.<\/p>\n<\/div><div class=\"fusion-builder-row fusion-builder-row-inner fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"--awb-flex-grow:0;--awb-flex-grow-medium:0;--awb-flex-grow-small:0;--awb-flex-shrink:0;--awb-flex-shrink-medium:0;--awb-flex-shrink-small:0;width:104% !important;max-width:104% !important;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-0 fusion_builder_column_inner_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-1 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:60px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2em;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:32;line-height:var(--awb-typography1-line-height);\">1. Preparing the Gauge Image Files<\/h2><\/div><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-bottom:30px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-2 hover-type-none\"><img decoding=\"async\" width=\"759\" height=\"616\" alt=\"gauge background and fill\" title=\"gauge_bg-and-fill\" src=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg-and-fill.webp\" data-orig-src=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg-and-fill.webp\" class=\"lazyload img-responsive wp-image-9998\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27759%27%20height%3D%27616%27%20viewBox%3D%270%200%20759%20616%27%3E%3Crect%20width%3D%27759%27%20height%3D%27616%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg-and-fill-200x162.webp 200w, https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg-and-fill-400x325.webp 400w, https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg-and-fill-600x487.webp 600w, https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg-and-fill.webp 759w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 1024px) 100vw, (max-width: 640px) 100vw, 759px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-2 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>First, I prepared the gauge images.<mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">gauge_bg.png<\/mark> is the background image of the gauge, and <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">gauge_fill.png<\/mark> is the image of the filling part that increases or decreases based on the value.<\/p>\n<p>I placed both images inside the <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">\/img\/pictures<\/mark> folder. Now we're all set to load these images through a script and display them on the screen.<\/p>\n<\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-1 fusion_builder_column_inner_1_2 1_2 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:50%;--awb-margin-top-large:20px;--awb-spacing-right-large:3.84%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:3.84%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-bottom:30px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-3 hover-type-none\"><img decoding=\"async\" width=\"32\" height=\"64\" alt=\"gauge_bg\" title=\"gauge_bg\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2764%27%20viewBox%3D%270%200%2032%2064%27%3E%3Crect%20width%3D%2732%27%20height%3D%2764%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg.png\" class=\"lazyload img-responsive wp-image-10011\"\/><\/span><\/div><div style=\"text-align:center;\"><a class=\"fusion-button button-flat fusion-button-default-size button-default fusion-button-default button-1 fusion-button-default-span fusion-button-default-type\" style=\"--awb-margin-bottom:30px;--button-border-radius-top-left:50px;--button-border-radius-top-right:50px;--button-border-radius-bottom-right:50px;--button-border-radius-bottom-left:50px;\" target=\"_self\" download href=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_bg.png\"><i class=\"fa-download fas awb-button__icon awb-button__icon--default button-icon-left\" aria-hidden=\"true\"><\/i><span class=\"fusion-button-text awb-button__text awb-button__text--default\">Download Image : gauge_bg.png<\/span><\/a><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-2 fusion_builder_column_inner_1_2 1_2 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:50%;--awb-margin-top-large:20px;--awb-spacing-right-large:3.84%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:3.84%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-bottom:30px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-4 hover-type-none\"><img decoding=\"async\" width=\"32\" height=\"64\" alt=\"gauge_fill\" title=\"gauge_fill\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2764%27%20viewBox%3D%270%200%2032%2064%27%3E%3Crect%20width%3D%2732%27%20height%3D%2764%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill.png\" class=\"lazyload img-responsive wp-image-10012\"\/><\/span><\/div><div style=\"text-align:center;\"><a class=\"fusion-button button-flat fusion-button-default-size button-default fusion-button-default button-2 fusion-button-default-span fusion-button-default-type\" style=\"--awb-margin-bottom:60px;--button-border-radius-top-left:50px;--button-border-radius-top-right:50px;--button-border-radius-bottom-right:50px;--button-border-radius-bottom-left:50px;\" target=\"_self\" download href=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill.png\"><i class=\"fa-download fas awb-button__icon awb-button__icon--default button-icon-left\" aria-hidden=\"true\"><\/i><span class=\"fusion-button-text awb-button__text awb-button__text--default\">Download Image : gauge_fill.png<\/span><\/a><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-3 fusion_builder_column_inner_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-separator fusion-full-width-sep\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_1);border-color:var(--awb-custom_color_1);border-top-width:1px;\"><\/div><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-4 fusion_builder_column_inner_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-2 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:60px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2em;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:32;line-height:var(--awb-typography1-line-height);\">2. Displaying the Images with a Script<\/h2><\/div><div class=\"fusion-text fusion-text-3\"><p>Now, let\u2019s try displaying the gauge images we prepared.<br \/>\nIn RPG Maker MZ, you can use the <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">showPicture<\/mark> command to show images on the screen.<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-1 > .CodeMirror, .fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-1 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_1\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_1\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_1\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">$gameScreen.showPicture(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode);<\/textarea><\/div><div class=\"fusion-text fusion-text-4 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>This is the basic format for displaying an image.<\/p>\n<\/div><div class=\"fusion-text fusion-text-5 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>Let\u2019s go over what each part means<\/p>\n<ul>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>pictureId<\/strong><\/mark>\nThis is the ID number of the picture you want to display.<br \/>\nYou can use numbers from 1 to 100.<br \/>\nIf multiple pictures overlap, the one with the smaller number appears underneath.<br \/>\nSo picture 1 is the bottommost layer, and picture 100 is the topmost.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>name<\/strong><\/mark>\nThis is the filename of the image to be displayed (without the extension).<br \/>\nFor example: gauge_bg (o) gauge_bg.png (x)<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>origin<\/strong><\/mark>\nThis sets the origin point of the image.<br \/>\n0 means the top-left corner, and 1 means the center.<br \/>\nThe origin point is used as the reference for moving or scaling the image.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>x<\/strong><\/mark>\nThe horizontal position on the screen (in pixels).<br \/>\nLarger values move the image more to the right.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>y<\/strong><\/mark>\nThe vertical position on the screen (in pixels).<br \/>\nLarger values move the image further down.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>scaleX<\/strong><\/mark>\nThis adjusts the width of the image.<br \/>\n100 means 100% of the original width.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>scaleY<\/strong><\/mark>\nThis adjusts the height of the image.<br \/>\n100 means 100% of the original height.<br \/>\nYou can create a vertically filling gauge just by adjusting scaleY.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>opacity<\/strong><\/mark>\nThis sets the transparency of the image.<br \/>\nYou can use values from 0 (completely invisible) to 255 (fully visible).<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><strong>blendMode<\/strong><\/mark>\nThis controls how the image blends with the background:<\/p>\n<ul>\n<li>0 : Normal<\/li>\n<li>1 : Additive<\/li>\n<li>2 : Multiply (darker)<\/li>\n<li>3 : Screen (lighter)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Now that we know what each part does, let\u2019s go ahead and use them one by one to display our gauge images on the screen. Let\u2019s take it step by step.<\/p>\n<\/div><div class=\"fusion-content-boxes content-boxes columns row fusion-columns-1 fusion-columns-total-1 fusion-content-boxes-1 content-boxes-icon-with-title content-left\" style=\"--awb-backgroundcolor:var(--awb-color6);--awb-border-radius-top-left:15px;--awb-border-radius-top-right:15px;--awb-border-radius-bottom-right:15px;--awb-border-radius-bottom-left:15px;--awb-body-color:var(--awb-color1);--awb-title-color:var(--awb-custom_color_1);--awb-margin-top:0px;--awb-margin-bottom:30px;--awb-hover-accent-color:var(--awb-custom_color_1);--awb-circle-hover-accent-color:var(--awb-custom_color_1);--awb-item-margin-bottom:40px;\" data-animationOffset=\"top-into-view\"><div style=\"--awb-backgroundcolor:var(--awb-color6);\" class=\"fusion-column content-box-column content-box-column content-box-column-1 col-lg-12 col-md-12 col-sm-12 fusion-content-box-hover content-box-column-last content-box-column-last-in-row\"><div class=\"col content-box-wrapper content-wrapper-background link-area-box link-type-text content-icon-wrapper-yes icon-hover-animation-fade\" data-link=\"https:\/\/docs.google.com\/spreadsheets\/d\/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs\/edit?pli=1&amp;gid=1186334695#gid=1186334695\" data-link-target=\"_blank\" data-animationOffset=\"top-into-view\"><div class=\"heading heading-with-icon icon-left\"><a class=\"heading-link\" style=\"float:left;\" href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs\/edit?pli=1&amp;gid=1186334695#gid=1186334695\" target=\"_blank\" rel=\"noopener noreferrer\"><div class=\"icon\"><span style=\"height:42px;width:42px;line-height:22px;border-color:rgba(255,255,255,0);border-width:1px;border-style:solid;background-color:var(--awb-color8);box-sizing:content-box;border-radius:50%;\"><i style=\"border-color:var(--awb-color8);border-width:1px;background-color:var(--awb-color7);box-sizing:content-box;height:40px;width:40px;line-height:40px;border-radius:50%;position:relative;top:auto;left:auto;margin:0;border-radius:50%;font-size:20px;\" aria-hidden=\"true\" class=\"fontawesome-icon fa-link fas circle-yes\"><\/i><\/span><\/div><h2 class=\"content-box-heading fusion-responsive-typography-calculated\" style=\"--h2_typography-font-size:24px;--fontSize:24;line-height:var(--awb-typography1-line-height);\">RPG MAKER MV \/ MZ Script Calls<\/h2><\/a><\/div><div class=\"fusion-clearfix\"><\/div><div class=\"content-container\">If you're curious about more picture-related script commands, try pressing Ctrl + F in the RPG MAKER MV \/ MZ Script Calls documentation and searching for the keyword Picture.<br \/>\nYou'll find lots of helpful information there.<\/div><div class=\"fusion-clearfix\"><\/div><a class=\" fusion-read-more\" style=\"float:left;\" href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs\/edit?pli=1&amp;gid=1186334695#gid=1186334695\" target=\"_blank\" rel=\"noopener noreferrer\">Read the documentation<\/a><div class=\"fusion-clearfix\"><\/div><\/div><\/div><div class=\"fusion-clearfix\"><\/div><\/div><div class=\"fusion-text fusion-text-6\"><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-2 > .CodeMirror, .fusion-syntax-highlighter-2 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-2 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-2 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-2 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_2\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_2\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_2\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">$gameScreen.showPicture(1, 'gauge_bg', 0, 30, 30, 100, 100, 255, 0);\n$gameScreen.showPicture(2, 'gauge_fill', 0, 30, 94, 100, 0, 255, 0);<\/textarea><\/div><div class=\"fusion-text fusion-text-7 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>Using the script above, I displayed the prepared images in the top-left corner of the screen.<\/p>\n<p>First, I showed the gauge background image (gauge_bg) as picture ID 1, placing it at the bottom layer.<br \/>\nIt\u2019s positioned 30 pixels away from both the left and the top edges of the screen. The width and height are both set to 100%, so the image shows at its original size. I set the opacity to 255 to make it fully visible, and the blend mode is set to 0 for normal display.<\/p>\n<p>Then, I placed the gauge fill image (gauge_fill) on top of it using picture ID 2. I matched its position to the background image\u201430 pixels from the top and left\u2014but this time I wanted the gauge to start empty.<\/p>\n<ul>\n<li>The height of the fill image is 64 pixels.<br \/>\nTo make the gauge appear to rise from the bottom, I shifted its y-coordinate down by 64 pixels\u2014on top of the 30-pixel base margin\u2014setting it to y = 94. This way, the image's base sits right where we want the gauge to begin.<\/li>\n<\/ul>\n<ul>\n<li>Then I set scaleY to 0, which hides the fill image vertically.<br \/>\nAt this stage, the gauge appears completely empty on screen.<br \/>\nLater, by gradually increasing the scaleY value, you can create the effect of the gauge slowly filling up from the bottom<\/li>\n<\/ul>\n<\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-5 fusion_builder_column_inner_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-3 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:60px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2em;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:32;line-height:var(--awb-typography1-line-height);\">3. Setting the Basis for the Gauge<\/h2><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-3 > .CodeMirror, .fusion-syntax-highlighter-3 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-3 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-3 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-3 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_3\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_3\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_3\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let goal;\nlet done;\nlet rate = done \/ goal;<\/textarea><\/div><div class=\"fusion-text fusion-text-8 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>Now it\u2019s time to decide what the gauge will measure and how much it should fill up.<br \/>\nTo do this, we\u2019ll use three variables:<\/p>\n<ul>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">goal<\/mark> : The target value (e.g., 100 points)<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">done<\/mark> : The current progress (e.g., your current score)<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">rate<\/mark> : The completion rate \u2014 how much of the goal has been achieved<br \/>\n(This is calculated as rate = done \/ goal) (rate = done \/ goal)<\/li>\n<\/ul>\n<p>For example, if the goal is 100 points and you\u2019ve reached 75 points, then the rate is 0.75, which means 75%.<br \/>\nThis rate will be an important value when calculating the gauge\u2019s vertical size (its scaleY).<\/p>\n<p>Here\u2019s a simple example:<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-4 > .CodeMirror, .fusion-syntax-highlighter-4 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-4 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_4\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_4\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_4\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let goal = 100;\nlet done = 50;\nlet rate = done \/ goal;\t\t\/\/ 0.5<\/textarea><\/div><div class=\"fusion-text fusion-text-9\"><p>In this case, the <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">rate<\/mark> becomes 0.5, or 50%, and everything works as expected.<br \/>\nBut in real situations, sometimes the <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">done<\/mark> value might go above the goal, or even become negative by mistake.<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-5 > .CodeMirror, .fusion-syntax-highlighter-5 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-5 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_5\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_5\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_5\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let goal = 100;\nlet done = 120;\nlet rate = done \/ goal;\t\t\/\/ 1.2 (120%)<\/textarea><\/div><div class=\"fusion-text fusion-text-10\"><p>This can result in a value that exceeds 1.<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-6 > .CodeMirror, .fusion-syntax-highlighter-6 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-6 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_6\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_6\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_6\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let goal = 100;\nlet done = -10;\nlet rate = done \/ goal;\t\t\/\/ -0.1 (a negative value)<\/textarea><\/div><div class=\"fusion-text fusion-text-11\"><p>Just like the negative value above, you might also get unexpected results.<\/p>\n<\/div><div class=\"fusion-text fusion-text-12 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>Values like 1.2 or -0.1 can cause problems.<br \/>\nElements like gauges, scale, opacity, or percentages usually expect values between 0 and 1.<br \/>\nSo if the number goes below 0 or above 1, it might not display properly.<\/p>\n<\/div><div class=\"fusion-separator\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;max-width:50%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><div class=\"fusion-title title fusion-title-4 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:30px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:1.9em;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:30.4;line-height:var(--awb-typography1-line-height);\">Rate Clamping Formula<\/h3><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-7 > .CodeMirror, .fusion-syntax-highlighter-7 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-7 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_7\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_7\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_7\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">rate = Math.max(0, Math.min(1, rate));<\/textarea><\/div><div class=\"fusion-text fusion-text-13 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>To prevent this, we add a safety net \u2014 a small but powerful formula that limits the rate to the safe range between 0 and 1.<\/p>\n<p>Let\u2019s break it down:<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-8 > .CodeMirror, .fusion-syntax-highlighter-8 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-8 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_8\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_8\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_8\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">Math.min(1, rate)<\/textarea><\/div><div class=\"fusion-text fusion-text-14 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>If the rate is greater than 1, it becomes 1. Otherwise, it stays the same.<br \/>\nThis keeps the maximum value at 1.<br \/>\n(Example: 1.2 \u2192 1)<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-9 > .CodeMirror, .fusion-syntax-highlighter-9 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-9 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_9\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_9\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_9\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">rate = Math.max(0, ...)<\/textarea><\/div><div class=\"fusion-text fusion-text-15 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>Then, if the result is less than 0, it becomes 0. Otherwise, it stays the same. This ensures the minimum is 0.<br \/>\n(Example: -0.1 \u2192 0)<\/p>\n<\/div><div class=\"fusion-text fusion-text-16 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>After going through both steps, the final rate is always safely between 0 and 1 \u2014 no more overflowing gauges or disappearing bars.<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-10 > .CodeMirror, .fusion-syntax-highlighter-10 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-10 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-10 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-10 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_10\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_10\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_10\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let goal = $gameVariables.value(101);\nlet done = $gameVariables.value(102);\nlet rate = done\/goal;\nrate = Math.max(0, Math.min(1, rate));<\/textarea><\/div><div class=\"fusion-text fusion-text-17 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>Here\u2019s how to use this with in-game variables.<\/p>\n<p>To fetch values stored in game variables, we use <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">$gameVariables.value(n)<\/mark> \u2014 just plug in the variable number in n.<\/p>\n<p>So, if variable 101 is your goal and variable 102 is your progress (done), you can load them like shown above.<\/p>\n<\/div>\n<div class=\"table-1\" style=\"--awb-margin-top:30px;--awb-margin-bottom:60px;\">\n<table width=\"100%\">\n<thead>\n<tr>\n<th style=\"width: 20%; text-align: center;\">done<\/th>\n<th style=\"text-align: center;\" align=\"left\">goal<\/th>\n<th style=\"text-align: center;\" align=\"left\">rate<\/th>\n<th style=\"text-align: center;\" align=\"left\">Raw Value<\/th>\n<th style=\"text-align: center;\" align=\"left\">Clamped Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"width: 20%; text-align: center;\">50<\/td>\n<td style=\"text-align: center;\" align=\"left\">100<\/td>\n<td style=\"text-align: center;\" align=\"left\">50\/100<\/td>\n<td style=\"text-align: center;\" align=\"left\">0.5<\/td>\n<td style=\"text-align: center;\" align=\"left\">0.5<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" align=\"left\">200<\/td>\n<td style=\"text-align: center;\" align=\"left\">100<\/td>\n<td style=\"text-align: center;\" align=\"left\">200\/100<\/td>\n<td style=\"text-align: center;\" align=\"left\">2<\/td>\n<td style=\"text-align: center;\" align=\"left\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" align=\"left\">-30<\/td>\n<td style=\"text-align: center;\" align=\"left\">100<\/td>\n<td style=\"text-align: center;\" align=\"left\">-30\/100<\/td>\n<td style=\"text-align: center;\" align=\"left\">-0.3<\/td>\n<td style=\"text-align: center;\" align=\"left\">0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"fusion-text fusion-text-18 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>This way, the gauge will always behave nicely and visually stay within the correct range.<\/p>\n<\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-6 fusion_builder_column_inner_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-5 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:60px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2em;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:32;line-height:var(--awb-typography1-line-height);\">4. Calculating the Position for the Moving Gauge Image<\/h2><\/div><div class=\"fusion-text fusion-text-19 fusion-text-no-margin\" style=\"--awb-margin-bottom:30px;\"><p>To make the gauge rise smoothly and accurately from the bottom of the screen, we\u2019ll calculate its position based on the image size.<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-11 > .CodeMirror, .fusion-syntax-highlighter-11 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-11 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-11 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-11 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_11\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_11\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_11\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let originalPicW = 32; \/\/ Image width in pixels \nlet originalPicH = 64; \/\/ Image height in pixels <\/textarea><\/div><div class=\"fusion-text fusion-text-20 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>First, to make things easier, I stored the width and height of the gauge fill image in variables.<br \/>\nThis way, when adjusting the x, y, or scaleY values, we don\u2019t need to hard-code numbers every time.<br \/>\nIf we ever change the image size later, we only need to update the variables\u2014much more convenient.<\/p>\n<\/div><div class=\"fusion-separator\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;max-width:50%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-12 > .CodeMirror, .fusion-syntax-highlighter-12 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-12 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-12 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-12 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_12\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_12\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_12\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let margin = 30;<\/textarea><\/div><div class=\"fusion-text fusion-text-21 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>Earlier, we placed the gauge images 30 pixels away from the edge of the screen.<br \/>\nNow, I\u2019ve stored that spacing as a variable named 'margin', so we can reuse it easily in position calculations.<\/p>\n<\/div><div class=\"fusion-separator\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;max-width:50%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-13 > .CodeMirror, .fusion-syntax-highlighter-13 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-13 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-13 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-13 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_13\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_13\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_13\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let picX = margin + 0;<\/textarea><\/div><div class=\"fusion-text fusion-text-22 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>Here, I made a variable for the x-position of the image. Right now it's just margin + 0, but using a variable like this makes future adjustments easier and keeps the code tidy and readable.<\/p>\n<\/div><div class=\"fusion-separator\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;max-width:50%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-14 > .CodeMirror, .fusion-syntax-highlighter-14 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-14 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-14 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-14 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_14\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_14\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_14\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let picY = margin + originalPicH - originalPicH * rate;<\/textarea><\/div><div class=\"fusion-text fusion-text-23 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>This line calculates the y-position for the gauge fill image so it can rise up from the bottom.<\/p>\n<p>Since we set the image's origin to 0 (top-left), the image grows or shrinks from that corner.<br \/>\nBut we want our gauge to appear as if it's rising from the bottom up.<br \/>\nSo, we need to move the image upward based on how full the gauge is.<\/p>\n<ol>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\"><strong>oringinalPicH<\/mark><\/strong><br \/>\nThe total height of the gauge fill image<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\"><strong>originalPicH * rate<\/mark><\/strong><br \/>\nThe current filled height of the gauge based on the completion rate<br \/>\n(e.g., if rate = 0.5, then 50% of the gauge is filled = 32px)<\/li>\n<li><strong> <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">originalPicH - originalPicH * rate<\/mark><\/strong><br \/>\nBy subtracting the height of the gauge from the height of the image, we can figure out the Y position where the gauge should be placed. Since the gauge bar rises from the bottom and grows upward, the top-left origin point doesn't stay fixed\u2014it keeps moving up as the image stretches. That\u2019s why we use variables to calculate it dynamically.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\"><strong>margin + originalPicH - originalPicH * rate<\/mark><\/strong><br \/>\nFinally, we add our margin value to keep a consistent distance from the edge of the screen.<br \/>\nThe result is the correct y-position for the bottom-aligned gauge.<\/li>\n<\/ol>\n<\/div><div class=\"fusion-separator\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;max-width:50%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-15 > .CodeMirror, .fusion-syntax-highlighter-15 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-15 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-15 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-15 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_15\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_15\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_15\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let scaleY = rate * 100;<\/textarea><\/div><div class=\"fusion-text fusion-text-24 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>This line sets the vertical scale of the gauge image\u2014that is, how high the fill bar should rise\u2014using a percentage.<\/p>\n<p>RPG Maker MZ scales images using percentage values(%), not pixels(<s>px<\/s>).<\/p>\n<ul>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">rate<\/mark> is a number between 0 and 1.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">100<\/mark> represents the full size of the image (100%).<\/li>\n<\/ul>\n<p>By multiplying the rate by 100, we get the percentage of the image to show.<\/p>\n<p>Examples:<\/p>\n<ul>\n<li>rate = 0.5 \u2192 scaleY = 50 (0.5 * 100)<br \/>\nimage appears at 50% height<\/li>\n<li>rate = 1 \u2192 scaleY = 100 (1 * 100)<br \/>\nfull height shown.<\/li>\n<\/ul>\n<p>Using this calculated scaleY value lets the gauge rise naturally from bottom to top, creating a clean and satisfying visual effect.<\/p>\n<\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_1);border-color:var(--awb-custom_color_1);border-top-width:1px;\"><\/div><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-7 fusion_builder_column_inner_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-6 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:60px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2em;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:32;line-height:var(--awb-typography1-line-height);\">5. Moving the Gauge Image with a Script<\/h2><\/div><div class=\"fusion-text fusion-text-25\"><p>Now, let\u2019s add some movement to our image. To do that, we\u2019ll use the <mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">movePicture<\/mark> command.<\/p>\n<p><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">movePicture<\/mark> allows you to smoothly change a picture\u2019s position, size, opacity, and more.<\/p>\n<\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-16 > .CodeMirror, .fusion-syntax-highlighter-16 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-16 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-custom_color_4);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_16\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_16\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_16\" data-readOnly=\"nocursor\" data-lineNumbers=\"\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">$gameScreen.movePicture(pictureId, origin, x, y, scaleX, scaleY, opacity, blendMode, frames, easing);<\/textarea><\/div><div class=\"fusion-text fusion-text-26 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>This is the basic format for moving a picture.<\/p>\n<p>It looks quite similar to showPicture, but there are a few key differences:<\/p>\n<ul>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\"><s>name<\/s><\/mark>\nImage filename is no longer included.<br \/>\nThat\u2019s because we're just moving an image that\u2019s already been displayed with showPicture.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">frames<\/mark>\nThis controls how long the movement takes.<br \/>\nThe unit is frames, and 60 frames = 1 second.<br \/>\nFor example, 30 frames would animate over 0.5 seconds.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">easing<\/mark>\nThis determines how the movement speeds up or slows down:<\/p>\n<ul>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">0<\/mark> : Constant speed<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">1<\/mark> : Starts slow, then speeds up<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">2<\/mark> : Starts fast, then slows down<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#f2b885;--awb-text-color:#121212;\">3<\/mark> : Eases in \u2192 speeds up \u2192 eases out<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>By playing with these two options\u2014frames and easing\u2014you can make your gauge animation look much more dynamic and smooth.<\/p>\n<\/div><div class=\"fusion-separator\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;max-width:50%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-17 > .CodeMirror, .fusion-syntax-highlighter-17 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-17 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-17 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-17 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:30px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_17\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_17\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_17\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">$gameScreen.movePicture(\n    2,        \/\/ Picture ID (gauge fill)\n    0,        \/\/ Origin: top-left\n    picX,     \/\/ X position (with margin)\n    picY,     \/\/ Y position (calculated based on rate)\n    100,      \/\/ Width (keep at 100%)\n    scaleY,   \/\/ Height (based on how full the gauge is)\n    255,      \/\/ Opacity (fully visible)\n    0,        \/\/ Blend mode: normal\n    30,       \/\/ Animation time: 30 frames = 0.5 seconds\n    1         \/\/ Easing: starts slow, then speeds up\n);<\/textarea><\/div><div class=\"fusion-text fusion-text-27 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>I've inserted the variables we prepared in step 4 right into the function.<\/p>\n<ul>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">picX<\/mark> : The horizontal position of the gauge fill.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">picY<\/mark> : The vertical position, calculated based on the current progress.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">scaleY<\/mark> : How much of the gauge is filled by rate.<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">30<\/mark> : The animation duration (0.5 seconds).<\/li>\n<li><mark class=\"fusion-highlight custom-textcolor highlight1 awb-highlight-background rounded\" style=\"--awb-color:#cbe2ac;--awb-text-color:#121212;\">1<\/mark> :Easing type for a natural acceleration effect.<\/li>\n<\/ul>\n<\/div><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-bottom:30px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-5 hover-type-none\"><img decoding=\"async\" width=\"92\" height=\"126\" alt=\"gauge fill to top\" title=\"gauge_fill_to_top\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2792%27%20height%3D%27126%27%20viewBox%3D%270%200%2092%20126%27%3E%3Crect%20width%3D%2792%27%20height%3D%27126%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill_to_top-1.gif\" class=\"lazyload img-responsive wp-image-10015\"\/><\/span><\/div><div class=\"fusion-text fusion-text-28 fusion-text-no-margin\" style=\"--awb-margin-bottom:60px;\"><p>When you run this code, the gauge will smoothly rise from the bottom to the top\u2014just like magic.<\/p>\n<\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_1);border-color:var(--awb-custom_color_1);border-top-width:1px;\"><\/div><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column_inner fusion-builder-nested-column-8 fusion_builder_column_inner_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:20px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-7 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:30px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2.1em;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:33.6;line-height:var(--awb-typography1-line-height);\">Full Code at a Glance<\/h2><\/div><div class=\"fusion-title title fusion-title-8 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:30px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2em;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:32;line-height:var(--awb-typography1-line-height);\">Code to Display the Gauge Images<\/h3><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-18 > .CodeMirror, .fusion-syntax-highlighter-18 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-18 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-18 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-18 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_18\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_18\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_18\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">$gameScreen.showPicture(1, 'gauge_bg', 0, 30, 30, 100, 100, 255, 0);\n$gameScreen.showPicture(2, 'gauge_fill', 0, 30, 94, 100, 0, 255, 0);<\/textarea><\/div><div class=\"fusion-separator\" style=\"align-self: center;margin-left: auto;margin-right: auto;margin-bottom:60px;width:100%;max-width:50%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:var(--awb-custom_color_4);border-color:var(--awb-custom_color_4);border-top-width:1px;\"><\/div><\/div><div class=\"fusion-title title fusion-title-9 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-text-color:var(--awb-custom_color_4);--awb-margin-bottom:30px;--awb-margin-top-small:20px;--awb-margin-bottom-small:10px;--awb-font-size:2em;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;text-transform:none;font-size:1em;--fontSize:32;line-height:var(--awb-typography1-line-height);\">Code to Make the Gauge Work<\/h3><\/div><style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-19 > .CodeMirror, .fusion-syntax-highlighter-19 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-custom_color_4);}.fusion-syntax-highlighter-19 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-custom_color_8); }.fusion-syntax-highlighter-19 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-custom_color_4); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-19 fusion-syntax-highlighter-theme-dark syntaxhighlighter\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:60px;margin-left:0px;font-size:14px;border-width:0px;border-style:solid;border-color:var(--awb-color8);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_19\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_19\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_19\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"oceanic-next\" data-mode=\"text\/javascript\">let goal = $gameVariables.value(n1);\nlet done = $gameVariables.value(n2);\nlet rate = done\/goal;\nrate = Math.max(0, Math.min(1, rate));\n \nlet originalPicW = 32; \/\/ Image width\nlet originalPicH = 64; \/\/ Image height\nlet margin = 30;\n \nlet picX = margin + 0;\nlet picY = margin + originalPicH - originalPicH * rate;\nlet scaleY = rate * 100;\n \n$gameScreen.movePicture(\n        2,\n        0,\n        picX,\n        picY,\n        100,\n        scaleY,\n        255,\n        0,\n        30,\n        1\n    );<\/textarea><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In RPG Maker MZ, you can create a rising gauge effect using showPicture and movePicture. By calculating the rate as done \/ goal and adjusting scaleY and the Y position, the gauge smoothly fills from bottom to top.<\/p>\n","protected":false},"featured_media":10015,"template":"","meta":{"_acf_changed":false},"class_list":["post-10014","js","type-js","status-publish","has-post-thumbnail","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top - Salgudiy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top - Salgudiy\" \/>\n<meta property=\"og:description\" content=\"In RPG Maker MZ, you can create a rising gauge effect using showPicture and movePicture. By calculating the rate as done \/ goal and adjusting scaleY and the Y position, the gauge smoothly fills from bottom to top.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/\" \/>\n<meta property=\"og:site_name\" content=\"Salgudiy\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-14T10:40:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill_to_top-1.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"92\" \/>\n\t<meta property=\"og:image:height\" content=\"126\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/\",\"url\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/\",\"name\":\"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top - Salgudiy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/salgudiy.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/gauge_fill_to_top-1.gif\",\"datePublished\":\"2026-09-14T09:30:10+00:00\",\"dateModified\":\"2026-09-14T10:40:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/#primaryimage\",\"url\":\"https:\\\/\\\/salgudiy.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/gauge_fill_to_top-1.gif\",\"contentUrl\":\"https:\\\/\\\/salgudiy.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/gauge_fill_to_top-1.gif\",\"width\":92,\"height\":126,\"caption\":\"gauge fill to top\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/js\\\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/\",\"name\":\"Salgudiy\",\"description\":\"\uc57c\ud638\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/salgudiy.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top - Salgudiy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/","og_locale":"en_US","og_type":"article","og_title":"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top - Salgudiy","og_description":"In RPG Maker MZ, you can create a rising gauge effect using showPicture and movePicture. By calculating the rate as done \/ goal and adjusting scaleY and the Y position, the gauge smoothly fills from bottom to top.","og_url":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/","og_site_name":"Salgudiy","article_modified_time":"2026-09-14T10:40:37+00:00","og_image":[{"width":92,"height":126,"url":"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill_to_top-1.gif","type":"image\/gif"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/","url":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/","name":"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top - Salgudiy","isPartOf":{"@id":"https:\/\/salgudiy.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/#primaryimage"},"image":{"@id":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/#primaryimage"},"thumbnailUrl":"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill_to_top-1.gif","datePublished":"2026-09-14T09:30:10+00:00","dateModified":"2026-09-14T10:40:37+00:00","breadcrumb":{"@id":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/#primaryimage","url":"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill_to_top-1.gif","contentUrl":"https:\/\/salgudiy.com\/wp-content\/uploads\/2026\/09\/gauge_fill_to_top-1.gif","width":92,"height":126,"caption":"gauge fill to top"},{"@type":"BreadcrumbList","@id":"https:\/\/salgudiy.com\/en\/js\/rpg-maker-mz-creating-a-gauge-that-fills-from-bottom-to-top\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/salgudiy.com\/en\/"},{"@type":"ListItem","position":2,"name":"[RPG MAKER MZ] Creating a Gauge that Fills from Bottom to Top"}]},{"@type":"WebSite","@id":"https:\/\/salgudiy.com\/en\/#website","url":"https:\/\/salgudiy.com\/en\/","name":"Salgudiy","description":"\uc57c\ud638","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/salgudiy.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/salgudiy.com\/en\/wp-json\/wp\/v2\/js\/10014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/salgudiy.com\/en\/wp-json\/wp\/v2\/js"}],"about":[{"href":"https:\/\/salgudiy.com\/en\/wp-json\/wp\/v2\/types\/js"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salgudiy.com\/en\/wp-json\/wp\/v2\/media\/10015"}],"wp:attachment":[{"href":"https:\/\/salgudiy.com\/en\/wp-json\/wp\/v2\/media?parent=10014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}