• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient Bossbar help with image scaling

klanton

New Member
Joined
Jul 6, 2023
Messages
6
Reaction score
0
GitHub
taco93
Hello I'm creating a bossbar that will be used for certain monsters in our server. I'm having issues when scaling the game window. The frame scales correctly and is an element of type UIWidget with size 356 x 68 (setting size scales down image correctly). However it's the type ProgressBar which i'm having issues with. It's functions doesn't work similar to an UIWidget. When setting size it's not scaled down (since it's updating itself in it's own lua file based on its height and width and sets the imagerect I'm thinking this should work). Result I'm currently having is this

Full size: works as intended

1690203488996.png

Game window scaled down to around 50%

Half size: frame works as intended but HP bar image doesn't update its position and gets cut off.
The green rect = hp bar
The blue rect = frame
1690203512192.png


Anyone knows what to do?
 
Last edited:
It's fully client side but I'm considering moving some logic to server to handle, not sure yet. The only issue I'm having with the system is scaling. Another + would be also to get fractional in percent of the current boss but the server only sends whole numbers when someone has been damaged (except the local player) :(
Post automatically merged:

I want to add that the images are not intended to be used in our client, we are using other images. These are used as a template and is not in any way going to be used commercially.
 
Last edited:
It's fully client side but I'm considering moving some logic to server to handle, not sure yet.
The only thing server should handle here is bar appearance, as in when boss appears/disappears near players (walk out of range, change floors, death etc.). Everything else can be client sided, name, current hp, hp change, all inside module's script.
As for the image, it should be simple widget with math for proper cropping.
 
Back
Top