Jump to content
Korean Random
Sign in to follow this  
herhor67

Dynamic OTM HP bars

Recommended Posts

Hello,

Is this possible to make one tank's hp bar wider than another's?

I thought about something like

backgroundWidth = maxHP/(2*vehicleLevel)

so eg. Maus would have 3200/20 = 160px, churchill1 would have 700/10 = 70px and T1 would have 115/2 = 58px.

 

Of course current hp would be: width = HP/(2*vehicleLevel)

 

Is this possible?

Share this post


Link to post

Short link
Share on other sites

Maybe Im doing something wrong, but none of these works:

"width": "{{hp-max}}",

"width": {{hp-max}},

 

Is there any other place I could change it, instead of markersAlive?

Share this post


Link to post

Short link
Share on other sites

This was quite strange.

When I used {{hp-max}} XVM threw error about letter H, looks like { are OK... But still bars were working normally, every had default 70px.

When I used "{{hp-max}}" the bar was empty (I could see the number, but not background or bar).

 

I will try tomorrow if it works with "70", if no, then just need to convert string to number, if yes, then I will ask dev about it.

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...