Adjust ONE hero's max health to a specific percent using the workshop

I’m trying to use the workshop to get a specific HP value of a single hero. But when I try, it adjusts all heroes’ max health on a team with the event hero.

So here’s what I’m trying to do with my gamemode: I’m trying to set hero health to specific amounts not just by a value of 10%.

The first hero that I’m testing this with is Bastion. I want his max health to be 250 instead of 300.

250/300 = 0.83333 or 83.333%

So I set up a rule:
Event: Ongoing - Each Player
Team: All
Player: Bastion
Conditions: 0
Actions: 1
Set Max Health(Event Player, 83.333)

When I do this however, all heroes have their normal starting health until someone selects Bastion on their team then all players on that team get their max health reduced to 83.333%. How do I make sure that this specific health change ONLY applies to one hero?

Try this:

variables
{
	player:
		0: hero
}

rule("Rule 1")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.hero != Hero Of(Event Player);
	}

	actions
	{
		Event Player.hero = Hero Of(Event Player);
		If(Event Player.hero == Hero(Bastion));
			Set Max Health(Event Player, 83.334);
		Else;
			Set Max Health(Event Player, 100);
		End;
	}
}

So I tried to replicate what you have there. I have no idea how to do those variables up top. But here is what I have:

Event
{
Ongoing - Each Player;
All;
All;
}

Conditions
{
Event Player == Hero Of(Event Player)
}

Actions
{
If(Is Hero Being Played(Hero(Bastion), All Team))
Set Max Health(Event Player, 83.333)
Else
Set Max Health(Event Player, 100)
End
}

Did you try to copy and paste the text into your game?

If you’re not on PC try this share code: 4XJGM

Your Original Rule was fine however you need to remove the Max Health Adjustment from the Player if they are not Bastion anymore.

rule(“Rule 1”)
{
event
{
Ongoing - Each Player;
All;
Bastion;
}

actions
{
Set Max Health(Event Player, 83.333);
}
}

rule(“Rule 2”)
{
event
{
Ongoing - Each Player;
All;
All;
}

conditions
{
Hero Of(Event Player) != Hero(Bastion);
}

actions
{
Set Max Health(Event Player, 100);
}
}

Thank you this worked and it was compatible with adjusting other heroes. However, Sigma’s shield is now having issues and can can only go up to half of the max shield health. Is there any way to fix this?

Barrier Health in General Scales to the Base health of the Hero, Set by Lobby Settings.
So you’d need to set Sigma’s Health in the Lobby Settings high enough to match the desired Barrier Health
and then use ‘Set Max Health’ for Sigma to Set his health down to the desired Value