Shields and Adjusted Max Healths

I keep getting glitches in my workshop code where if I go from one hero playing with a modified Maximum health and move to another one with a different modified maximum health, it sometimes affects the character’s Barrier Health, but not their regular HP. Only works to lower the Barrier Health from your Max HP, doesn’t seem to raise it beyond the maximum.

It affects All deployable Shields ; but not sure if it affects Zarya Bubbles.

I’ll post what I think is the affected code up here if it’s not a heard of thing, but I figure if I’m getting it so often, then I’m sure other people are having the issue as well. I think I can clean up the coding so that the switching doesn’t affect the barrier HP, but does anyone know if there’s an effective way to get this Shield health reduction, without affecting character’s HP, and without having to swap characters to make the effect occur?

Do you know if this affects buildables (Torbjorn/Symmetra’s turrets or her teleporter)

I’ll test that stuff right now.

It seems that just Sigma shields that get affected in my current patch of the workshop mode. I might have already fixed the other heroes, so I’ll see if I can find an older version of the workshop mode that had the problem happening more frequently.

Here’s a code with just the two lines of code that appear to affect the shield change with Sigma. I removed all the other stuff that was in the workshop mode and isolated it down to just the changes I had made to Zarya and Sigma that seem to be involved with affecting their health. If you spawn as Zarya, and then change into Sigma, his barrier will only have half max hp.

DJFDX

It looks like when I set a custom HP when they actually spawn, but then change the HP maximum using a line of code that affects characters in spawn - then when the character switch happens - it doesn’t take the shield health into account for one reason or another. He has 750 Barrier Health in the code above, and with a slight edit to the initial health set that occurs during spawn, I was able to make it 1000 Barrier Health in the code below (after you spawn as Zarya then switch to Sigma)

7APKX

If someone can make this effect occur on Sigma without requiring the Swap, then I would love to see that code, because I would have so much fun playing around with barrier healths like that.

===========

[More edits - I can’t seem to get the barrier health adjustment to work for the other Tanks for some reason. Not sure if this is just a weird effect of the workshop mode - or if it’s something that the Devs know about and are trying to patch - cause this was just affecting all the Tanks on my game mode the other day - but now I can only get it to affect Sigma]