Problem with gauge

Discussion in 'RPG Maker MV' started by sim22x, May 17, 2018.

  1. sim22x

    sim22x Villager Member

    Messages:
    28
    Likes Received:
    6
    First Language:
    japanese
    Primarily Uses:
    RMMV
    PHP:
    var = new Window_Base;
    g.drawGauge(10,10,600,0.5,'red','red');
    Why it's not working where is my gauge? :hswt2:
     
    #1
  2. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    923
    Likes Received:
    575
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    1. You need to call Window_Base as a constructor, which means giving it the arguments of x, y, width, height inside parentheses.

    2. You need to add the window to the current scene
     
    #2
    Frogboy and sim22x like this.
  3. sim22x

    sim22x Villager Member

    Messages:
    28
    Likes Received:
    6
    First Language:
    japanese
    Primarily Uses:
    RMMV
    PHP:
    var myGauge = new Window_Base;
    var 
    scene SceneManager._scene;
    myGauge.initialize(10,10,600,100);
    scene.addChild(myGauge);
    myGauge.drawGauge(10,10,600,0.5,'red','red');
    Ok now it works!

    [​IMG]

    But I don't need that window background.
    And I don't understand how to set the gauge height.
    What should I do? :hswt:
     
    #3
  4. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    923
    Likes Received:
    575
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    You can set the opacity of the window to 0 to hide it.
    To increase the gauge height you would have to overwrite Window_Base.prototype.drawGauge to allow a variable height because it's currently hard-coded as 6. Better to overwrite it as a plugin rather than edit the core script directly.
     
    #4
    Frogboy likes this.

Share This Page