Ress 21 Posted July 17, 2018 I am trying to create Team HP Pool Bar without extra py_macros. So far so good, but i hit the wall with actual direction of bars. Can't figure out how to make bars fade in one direction only (from left to right for allies/from right to left for enemy) and not from both sides. Any suggestions?battleLabelsTeamHPBar.xc Quote Share this post Link to post Short link Share on other sites
Heliomalt 52 #436465 Posted July 17, 2018 Here is mine, thx to MarsOne, he made it: "TEAM_HP_bar": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": -1010, // "-{{py:sum(50,{{py:xvm.screenHCenter}})}}", "y": 32, "w": "{{py:xvm.total_hp.ally(240)}}", "h": 26, "screenHAlign": "right", "alpha": 75, "bgColor": "{{.colors.system.ally_alive}}" }, "ENEMY_HP_bar": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": 1010, // "{{py:sum(50,{{py:xvm.screenHCenter}})}}", "y": 32, "w": "{{py:xvm.total_hp.enemy(240)}}", "h": 26, "screenHAlign": "left", "alpha": 75, "bgColor": "{{.colors.system.enemy_alive}}" }, value x -1010 and x 1010 is for 1920x1080 resolution, for other resolution use the py:sum or change it to your own value. Quote Share this post Link to post Short link Share on other sites
ktulho 5,780 #436472 Posted July 17, 2018 @Ress battleLabelsTeamHPBar.xc 1 Quote Share this post Link to post Short link Share on other sites
Ress 21 #436477 Posted July 17, 2018 1 hour ago, Heliomalt said: value x -1010 and x 1010 is for 1920x1080 resolution, for other resolution use the py:sum or change it to your own value. Personally avoiding to use high x-y off screen positioning,because i share config with friends that play on lower res. As for sum with screenHCenter, initially i did found older topic with almost same macro but couldn't make it work (enemy bar was on left, and when added screenHalign:center, it was centered but then everything else was on opposite side...i was staring on macro for like 10min couldn't figure out what was wrong ..), so i switched to regular x-y with screenH/Valign and got new issues. 49 minutes ago, ktulho said: @Ress battleLabelsTeamHPBar.xc Huh interesting, now this actually works. ...had to correct enemy bar to x180 {{py:math.sum({{py:math.div({{py:xvm.total_hp.enemy(180)}},2)}}, 4)}}, but it work.Thanks @ktulho! Quote Share this post Link to post Short link Share on other sites
Heliomalt 52 #436564 Posted July 18, 2018 This is the complete script, it works for me and others, maybe this help someone else: "TEAM_ENEMY_HP_ground": { "enabled": true, "x": 0, "y": 32, "w": 100, "h": 26, "screenHAlign": "center", "alpha": 20, "bgColor": "#333333" }, "TEAM_HP_ground": { "enabled": true, "x": -170, "y": 32, "w": 240, "h": 26, "screenHAlign": "center", "alpha": 50, "bgColor": "#333333" }, "ENEMY_HP_ground": { "enabled": true, "x": 170, "y": 32, "w": 240, "h": 26, "screenHAlign": "center", "alpha": 50, "bgColor": "#333333" }, "TEAM_HP_bar": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": -1010, // "-{{py:sum(50,{{py:xvm.screenHCenter}})}}", "y": 32, "w": "{{py:xvm.total_hp.ally(240)}}", "h": 26, "screenHAlign": "right", "alpha": 75, "bgColor": "{{.colors.system.ally_alive}}" }, "ENEMY_HP_bar": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": 1010, // "{{py:sum(50,{{py:xvm.screenHCenter}})}}", "y": 32, "w": "{{py:xvm.total_hp.enemy(240)}}", "h": 26, "screenHAlign": "left", "alpha": 75, "bgColor": "{{.colors.system.enemy_alive}}" }, "TEAM_HP_border": { "enabled": true, "x": -170, "y": 32, "w": 240, "h": 26, "screenHAlign": "center", "alpha": 100, "borderColor": "#FFFFFF" }, "ENEMY_HP_border": { "enabled": true, "x": 170, "y": 32, "w": 240, "h": 26, "screenHAlign": "center", "alpha": 100, "borderColor": "#FFFFFF" }, "TEAM_ENEMY_HP_diff": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": 0, "y": 35, "screenHAlign": "center", "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 }, "textFormat": { "size": 13, "bold": "true" }, "format": "{{py:xvm.total_hp.ally>{{py:xvm.total_hp.enemy}}?+{{py:sub({{py:xvm.total_hp.ally}}, {{py:xvm.total_hp.enemy}})}}|{{py:sub({{py:xvm.total_hp.ally}}, {{py:xvm.total_hp.enemy}})}}}}" }, "TEAM_HP": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": -170, "y": 33, "screenHAlign": "center", "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 }, "textFormat": { "size": 16, "bold": true }, "format": "{{py:xvm.total_hp.ally}}" }, "ENEMY_HP": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": 170, "y": 33, "screenHAlign": "center", "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 }, "textFormat": { "size": 16, "bold": true }, "format": "{{py:xvm.total_hp.enemy}}" }, "mainGun": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", // "hotKeyCode": 56, // "onHold": true, "x": 320, "y": 5, "screenHAlign": "center", "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 }, "textFormat": { "size": 15, "align": "center" }, "format": "<textformat tabstops='[125]' leading='-22' ><img src='img://gui/maps/icons/achievement/32x32/mainGun.png' width='24' height='24'>\n<tab>{{l10n:mainGun}}: <font color='#FFCC33'><b>{{py:xvm.total_hp.mainGun('',{{py:xvm.totalDamage}})}}</b></font></textformat>" }, Quote Share this post Link to post Short link Share on other sites
Andyss 16 #451948 Posted March 2, 2019 (edited) would need some help with HP team pool bar after last stable XVM update, pool hp graphics is messed like in picture (impossible to play, because graphic is covering whole display, I dont remeber anymore where did I pick that graphics config, somewhere from this xvm forum-. Anyone knows what I have to fix? Edited March 2, 2019 by Andyss Quote Share this post Link to post Short link Share on other sites
ktulho 5,780 #451951 Posted March 2, 2019 @Andyss https://kr.cm/f/t/48707/ Quote Share this post Link to post Short link Share on other sites
Andyss 16 #451952 Posted March 2, 2019 Hi can you help me ? where is that here is my config Ma7rix.zip Quote Share this post Link to post Short link Share on other sites
ktulho 5,780 #451953 Posted March 2, 2019 @Andyss battleLabelsTemplates.xc Quote Share this post Link to post Short link Share on other sites
Andyss 16 #451954 Posted March 2, 2019 thank you very much Quote Share this post Link to post Short link Share on other sites