Help! HUD issues...

Discussion in 'RGSSx Script Support' started by Dakieda, Jul 6, 2019.

  1. Dakieda

    Dakieda Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMVXA
    So I am making a survival type game with overworld battles in which i need to display health, stamina, thirst and hunger. I was using a script to make the thirst and hunger, which worked well, but it doesn't visually match the one I have for health. I don't have anything at all for stamina (I was thinking MP would be a nice replacement since I will be calling stamina from the overworld battles). I was able to edit the one that shows health to draw the hunger, stam and thirst bars, but am unsure now how to link these new bars either to a script that makes them work (i.e. losing 1 point of 300 hunger/thirst per step or using stam in battle)...
    Does anyone know what I could do to make them decrease? The hunger one works perfectly fine, but I don't really know how to script, so it look like its functioning on the power of black magic to me o_O

    The script I want to use is the Faalco GS Pack - {HUD}
    Link to original script --> https://forums.rpgmakerweb.com/index.php?threads/faalco-gs-pack-hud.2030/

    Anddd screenie of how the bars look at the moment. So far the health is the only one that is being affected.
    https://sta.sh/01yt5gkrthpv
     
    #1
  2. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,164
    Likes Received:
    10,317
    First Language:
    English
    Primarily Uses:
    RMVXA
    'Scripts' is where people who have written completed scripts that they want to share with others can post them.

    I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. Dakieda

    Dakieda Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMVXA
    Oh sorry, I thought that was where I posted it. My apologies.
     
    #3
  4. Dakieda

    Dakieda Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMVXA
    If anyone is having the same issues...I made this for my game, and it matches the Bravo Hunger/Thirst/Sleep System by Bravo2Kilo.
    Screenies:
    https://sta.sh/0b4wvommbek
    https://sta.sh/0209bhayzkes
    1) Follow the guide here for the gauge => https://www.rpgmakercentral.com/blo...ud-beginner-intermediate-using-common-events/
    2) Put this in your scripts below Materials but above main:
    Code:
    #===============================================================================
    # ** Custom Health Bar Text by Dakieda 7/7/2019
    #===============================================================================
    
    class HUD < Sprite
    
    def initialize(view)
    super(view)
    
    self.bitmap = Bitmap.new(200,200)
    self.z = 300
    update
    end
    
    def update
    super
    
    self.bitmap.clear
    
    self.bitmap.draw_text(14, -1, 200, 24, "Health")
    
    end
    def dispose
    self.bitmap.dispose
    super
    end
    end
    
    class Spriteset_Map
    alias :or_initialize :initialize
    def initialize
    @hud = HUD.new(@viewport2)
    or_initialize
    end
    alias :or_update :update
    def update
    @hud.update if Graphics.frame_count % 5 == 1
    or_update
    end
    alias :or_dispose :dispose
    def dispose
    @hud.dispose
    or_dispose
    end
    end
    **Keep in mind this will show up on any screen. Feel free to edit it to whatever you need <3
     
    #4

Share This Page