The cool Treecko
Wild Treecko appeared!
- 146
- Posts
- 4
- Years
- Earth
- Seen Mar 22, 2024
This compatible with 18.x?
I would like to push my Hud to the edges, but when changing the coordinates, the icons disappear, they are below the border.
My HUD:
https://freeimage.host/i/fRtWN4
To move the sprites/texts on any position on screen, you need to do 2 things:How do I play Hud to the edges? I tried to move by changing the x and y values, but when they reach the edge they seem to be under the edge and do not overlap ...
barBitmap = Bitmap.new(Graphics.width,BARHEIGHT)
barRect = Rect.new(0,0,barBitmap.width,barBitmap.height)
barBitmap = Bitmap.new(Graphics.width,Graphics.height)
barRect = Rect.new(0,0,barBitmap.width,BARHEIGHT)
I'm almost sure that people are using with v18.1 without issues.This compatible with 18.x?
To move the sprites/texts on any position on screen, you need to do 2 things:
1. Change the rect of bar, so it cover more space. I will put at entire screen
2. Stops blue mask for covering entire screen.
For both things, change:
Code:barBitmap = Bitmap.new(Graphics.width,BARHEIGHT) barRect = Rect.new(0,0,barBitmap.width,barBitmap.height)
Into:
Code:barBitmap = Bitmap.new(Graphics.width,Graphics.height) barRect = Rect.new(0,0,barBitmap.width,BARHEIGHT)
I'm almost sure that people are using with v18.1 without issues.
Nice! Its Works!
Would anyone know how to make a second experiment bar, which would be below the HP bar?
This isn't hard, you need to copy the HP Bar logic and transform into exp bar. A step-by-step:Nice! Its Works!
Would anyone know how to make a second experiment bar, which would be below the HP bar?
if SHOWHPBARS
borderWidth = 36
borderHeight = 10
fillWidth = 32
fillHeight = 6
for i in 0...6
x=64*i+48
y=@yposition+45
@sprites["expbarborder#{i}"] = BitmapSprite.new(
borderWidth,borderHeight,@viewport1
)
@sprites["expbarborder#{i}"].x = x-borderWidth/2
@sprites["expbarborder#{i}"].y = y-borderHeight/2
@sprites["expbarborder#{i}"].bitmap.fill_rect(
Rect.new(0,0,borderWidth,borderHeight),
Color.new(32,32,32)
)
@sprites["expbarborder#{i}"].bitmap.fill_rect(
(borderWidth-fillWidth)/2,
(borderHeight-fillHeight)/2,
fillWidth,
fillHeight,
Color.new(96,96,96)
)
@sprites["expbarborder#{i}"].visible = false
@sprites["expbarfill#{i}"] = BitmapSprite.new(
fillWidth,fillHeight,@viewport1
)
@sprites["expbarfill#{i}"].x = x-fillWidth/2
@sprites["expbarfill#{i}"].y = y-fillHeight/2
end
refreshExpBars
end
def refreshExpBars
for i in 0...6
startexp = 0
endexp = 0
hasExp = i<$Trainer.party.size && !$Trainer.party[i].egg?
if hasExp
exp = $Trainer.party[i].exp
growthrate = $Trainer.party[i].growthrate
startexp = PBExperience.pbGetStartExperience($Trainer.party[i].level,growthrate)
endexp = PBExperience.pbGetStartExperience($Trainer.party[i].level+1,growthrate)
end
lastTimeWasExp = @partyExp [i] != 0
@sprites["expbarborder#{i}"].visible = hasExp if lastTimeWasExp != hasExp
redrawFill = exp != @partyExp[i]
if redrawFill
@partyExp[i] = exp
@sprites["expbarfill#{i}"].bitmap.clear
width = @sprites["expbarfill#{i}"].bitmap.width
height = @sprites["expbarfill#{i}"].bitmap.height
fillAmount = (endexp==0) ? 0 : (exp - startexp)*width/(endexp - startexp)
if fillAmount > 0
hpColors=[Color.new(24,144,248),Color.new(72,120,160)]
shadowHeight = 2
rect = Rect.new(0,0,fillAmount,shadowHeight)
@sprites["expbarfill#{i}"].bitmap.fill_rect(rect, hpColors[1])
rect = Rect.new(0,shadowHeight,fillAmount,height-shadowHeight)
@sprites["expbarfill#{i}"].bitmap.fill_rect(rect, hpColors[0])
end
end
end
end
Change 'ret[1] = _INTL("text two")' to 'ret[1] = pbGetTimeNow.strftime("%I:%M %p")'.How can I add time instead of the 2nd text
Yes!Hey! Thanks for the script, there is some way to make an option just like Windowskins to change the HUD graphic?
@partyTotalHP = Array.new(6, 0)
refreshPartyIcons
refreshHUDBar
def refreshPartyIcons
def refreshHUDBar
drawBarFromPath = BGPATH != ""
return if !drawBarFromPath || $PokemonSystem.hudBar==@lastHUDBar
@lastHUDBar = $PokemonSystem.hudBar
@sprites["bgbar"].setBitmap(case $PokemonSystem.hudBar
when 0 then ""
when 1 then "Graphics/Pictures/hud1"
when 2 then "Graphics/Pictures/hud2"
end)
end
I gonna make a V19.1 version (I probably wait more time for more hotfixes).how can you do it for v19 essentials.
I tested and this is already working with Essentials v19.1. Anyway, I edited to remove the deprecated methods.how can you do it for v19 essentials.
After 'def initialize(viewport1)' addHey, was there anyway of getting the HUD to update in other menus as it would only update when returning to the game?
@@instanceArray.compact!
@@instanceArray.push(self)
@@instanceArray = []
def self.updateAll
for hud in @@instanceArray
hud.update if hud && hud.hasSprites?
end
end
def hasSprites?
return [email protected]?
end
Oh! I noticed a HUD in your video and I wondered if it is this HUD.Thank you for the script, i've been using it for a while now
Put a switch number on SWITCHNUMBER and toggle it on/off.how do i hide it in the intro? I would like to know if it is possible to deactivate it and re-activate it with a event thank you so much
Put a switch number on SWITCHNUMBER and toggle it on/off.
An update is coming!
Oh! I noticed a HUD in your video and I wondered if it is this HUD.
Let's say that your SWITCHNUMBER is 99. At professor lecture start, add the event command to change switch 99 as off as the first command.yes I had understood from the script that you had also written it above siwtchnumber, but I wanted to know how I can call it from an event I don't know what to write, I just wanted to deactivate it in the intro and make it appear at the beginning of the game
So you are a veteran, nice!then I sent you a video if you can kindly watch it is still in WIP but i'm at the point of releasing it and i will update it slowly, i'm using a lot of your scripts so you are already in my credits for years, i'm developing it since 5 years alone.
This happens because the sound name was changed on Essentials v17 and no one reported since. Anyway, there is a better way of doing this, I gonna update this script soon. In meantime, change all 'pbSEPlay("Choose",80)' to 'pbPlayCursorSE'.then I also wanted to know about the character selection maybe is offtopic here but i need your help, I wanted to know how to put the sound while selecting, because this part is without sounds you can check the video for what i meaning ( i send you the yt video link privately checks the dm, I can not send it here tells me that I have to create at least 5 post
Let's say that your SWITCHNUMBER is 99. At professor lecture start, add the event command to change switch 99 as off as the first command.
When you finished your intro and want to the HUD appears, do the event command to change the switch 99 as on.
So you are a veteran, nice!
This happens because the sound name was changed on Essentials v17 and no one reported since. Anyway, there is a better way of doing this, I gonna update this script soon. In meantime, change all 'pbSEPlay("Choose",80)' to 'pbPlayCursorSE'.