• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

HUD

mane

I need more class of English:/
  • 17
    Posts
    13
    Years
    my question is how I can update the texts that display the time and pokeballs
    because to update the texts I have to enter to a house

    here is the script
    Spoiler:
     

    Nickalooose

    --------------------
  • 1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    This belongs in the HUD thread... Unless someone has this script, not many can answer, since you didn't post all the script... Or at least doesn't show it all to me... I have clue what your problem is myself
     

    thor348

    That's Oak to You
  • 137
    Posts
    11
    Years
    Here's my version of the script from FL, I don't know if it can help with what you want. It's only kind of modified.

    Spoiler:
     

    FL

    Pokémon Island Creator
  • 2,454
    Posts
    13
    Years
    • Seen May 25, 2024
    Create/assign your variables in def createHud.

    With this, your values are updated, at max, in 4 seconds. UPDATESPERSECONDS value 0.25 (1/4) means that the HUD is updated every 4 seconds. To raise this time:

    Easier way: Raise the UPDATESPERSECONDS values.

    Best way: Save the values that you wish to update in variables at def createHud and check if these variables are different at start of def updateHud on every 2, 3, 5, 10 frames (just make an 'if Graphics.frame_count%INSERTTHEFRAMENUMBERHERE==0'). If one of these values are different, set a flag to enter in the other 'if' of def updateHud.
     

    mane

    I need more class of English:/
  • 17
    Posts
    13
    Years
    Create/assign your variables in def createHud.

    With this, your values are updated, at max, in 4 seconds. UPDATESPERSECONDS value 0.25 (1/4) means that the HUD is updated every 4 seconds. To raise this time:

    Easier way: Raise the UPDATESPERSECONDS values.

    Best way: Save the values that you wish to update in variables at def createHud and check if these variables are different at start of def updateHud on every 2, 3, 5, 10 frames (just make an 'if Graphics.frame_count%INSERTTHEFRAMENUMBERHERE==0'). If one of these values are different, set a flag to enter in the other 'if' of def updateHud.

    thanks was easy, but still do not quite understand the rgss
    thank you very much
     

    FL

    Pokémon Island Creator
  • 2,454
    Posts
    13
    Years
    • Seen May 25, 2024
    thanks was easy, but still do not quite understand the rgss
    thank you very much
    When you put these lines inside of a class and outside of a method (def), these lines will execute (and the values will be assign) every time that the class is created that is when you load a new map. If you put these lines in a method, these lines will execute every time that this method is called (if you don't use a "return" before these lines or a similar thing).

    Typically, the def update are called on every frame (40 frames per second if you didn't change the frame rate and excluding the FPS down). In the logic that I made, the def createHud is called in every 4 frame rate (40*4=160 frames), so the values will be updated in every call.

    And, besides that I said in the other post, the "best way" is to update (or mark for update) the HUD only when these HUD values change.
     
  • 15
    Posts
    15
    Years
    • Seen Aug 7, 2013
    Does anybody know how to fix this? I know the error is with pbQuantity, but it's used in other scripts which work just fine..

    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: NoMethodError

    Message: undefined method `pbQuantity' for nil:NilClass

    HUD:34:in `initialize'

    Scene_Map:29:in `new'

    Scene_Map:29:in `createSpritesets'

    Scene_Map:28:in `each'

    Scene_Map:28:in `createSpritesets'

    Scene_Map:63:in `main'

    Main:37:in `mainFunctionDebug'

    Main:15:in `mainFunction'

    Main:15:in `pbCriticalCode'

    Main:15:in `mainFunction'
     

    FL

    Pokémon Island Creator
  • 2,454
    Posts
    13
    Years
    • Seen May 25, 2024
    Does anybody know how to fix this? I know the error is with pbQuantity, but it's used in other scripts which work just fine..

    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: NoMethodError

    Message: undefined method `pbQuantity' for nil:NilClass

    HUD:34:in `initialize'

    Scene_Map:29:in `new'

    Scene_Map:29:in `createSpritesets'

    Scene_Map:28:in `each'

    Scene_Map:28:in `createSpritesets'

    Scene_Map:63:in `main'

    Main:37:in `mainFunctionDebug'

    Main:15:in `mainFunction'

    Main:15:in `pbCriticalCode'

    Main:15:in `mainFunction'
    Yes, I can't understand this, I never had this error, try using an old version (https://pokemonessentials.wikia.com/wiki/Tutorial:Simple_HUD?oldid=9373).
     
  • 15
    Posts
    15
    Years
    • Seen Aug 7, 2013
    Yes, I can't understand this, I never had this error, try using an old version

    Yeah I managed to get it working.
    My only question now, is how would one go about making the sprites displayed on the HUD smaller?

    Thanks for the help FL, I really appreciate it.
     

    FL

    Pokémon Island Creator
  • 2,454
    Posts
    13
    Years
    • Seen May 25, 2024
    Yeah I managed to get it working.
    My only question now, is how would one go about making the sprites displayed on the HUD smaller?

    Thanks for the help FL, I really appreciate it.
    Before line '@hud.push(pokeicon)' add:

    Code:
    pokeicon.zoom_x=0.5
    pokeicon.zoom_y=0.5

    To make the icons half of the size.
     
  • 15
    Posts
    15
    Years
    • Seen Aug 7, 2013
    Thank you so much FL! I appreciate this.
    Finally, do you know how one would show status's of Pokemon, or their HP bars in the HUD too?

    This is all a learning curve for me so this is really helpful, once again thank you.
     
    Back
    Top