Need help with something

hello
I’ve been trying to make it so that when someone dies and is rezzed (not mercy rez, game res), they respawn with the original health they had before the death.
Basically I’m trying to do an ult cancel, but I can’t seem to find how. There is no “health of” in workshop.

thanks

You can do an ult cancel by quickly swaping the hero of the player forth and back with “start forcing player to be hero”.

I tried this, and it still heals the player up to full health, sadly.

set player variable(event player, currentHealth, health(event player))
start forcing player to be hero(event player, hero(*different hero*))
wait(0.25)
start forcing player to be hero(event player, hero(*original hero*))
wait(0.25)
damage(event player, null, subtract(max health(event player), player variable(event player, currentHealth)))
stop forcing player to be hero()

Really? :slight_smile:

Assisted by SpyCrab (testing)
rule("catch ulter")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is True For Any(All Living Players(All Teams), And(Compare(Event Player, !=, Current Array Element), Compare(Is Using Ultimate(
			Current Array Element), ==, True))) == True;
	}

	actions
	{
		Set Player Variable(Event Player, B, Health(Event Player));
	}
}

rule("Rezz player with previous state")
{
	event
	{
		Player Died;
		All;
		All;
	}

	conditions
	{
		Is Using Ultimate(Attacker) == True;
	}

	actions
	{
		Resurrect(Event Player);
		Wait(0.250, Ignore Condition);
		Damage(Event Player, Null, Subtract(Health(Event Player), Player Variable(Event Player, B)));
	}
}

More info about me and my game mods you can find here.