Jump to content

Example/template of exp bar widget?


Recommended Posts

9 minutes ago, SenL said:

Oh I see. So what calls this OnUpdate :)? I searched modmain, badge widget and statusdisplays widget and found no "OnUpdate"

The game engine is what updates it, if I were to go into details further about how this works it would be a massive post/topic. The line that specifically tells the engine to update this badge is the following line in the levelbadge.lua file.

    self:StartUpdating()

 

Link to comment
Share on other sites

Hm, when adding a 2nd badge, I name the 2nd one "progressbar2" and pass it to StatusDisplaysPostInit() as "MakeAnotherBadge" (copy-paste mostly all except position)... but it's invisible. 1st badge is still fine.

progressbar2.zip exists and it's from progressbar2.scml (inside I renamed anim from progressbar to progressbar2).

Link to comment
Share on other sites

13 hours ago, SenL said:

Hm, when adding a 2nd badge, I name the 2nd one "progressbar2" and pass it to StatusDisplaysPostInit() as "MakeAnotherBadge" (copy-paste mostly all except position)... but it's invisible. 1st badge is still fine.

progressbar2.zip exists and it's from progressbar2.scml (inside I renamed anim from progressbar to progressbar2).

I don't think it's invisible, it's probably being hidden behind the first progress bar. I've updated the original code which allows you to set the position of the badges when it's normal and when it's modded (Always on Status). Simply change the position you want them to be set and it will work properly.

Link to comment
Share on other sites

17 minutes ago, SenL said:

I already moved to the left of the 1st badge. It's visible with original "progressbar".

When I change to progressbar2, it becomes invisible.

Okay, we will chat through steam so I can help you in real time instead of wasting time checking forums.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...