Like this has to be checked occasionally, so if it's setting Actor hp from the variable, later on the control variable will use that -altered HP- which wouldn't work as intended.
Sorry, I should have said to set a variable from the actors
max HP and not their current HP.
You'd take the max HP of each actor (setting a variable), and add them up to create an HP pool, we'll call this variable "Max HP Pool".
From here, there are several different methods you could employ:
Option 1) Add each actor's Max HP to a "Max HP Pool" Variable. "Max HP Pool" will be mostly static, other than occasionally going up whenever your party member's max HP go up. You could then create a second variable based on "Max HP Pool", but this new variable (we'll just call "Party HP") will be dynamic like a normal HP pool in the game. In you common event, whenever the player takes damage, subtract the "damage amount" from "Party HP". You can then set conditional branches depending on how high or low this "Party HP" variable is at, such as setting a game over state when this value reaches 0 or less. Restorative items would increase the "Party HP" variable, and you'd need to create a limiter - or clamp - so that if "Party HP" exceed "Max HP Pool", "Party HP" will be set to "Max HP Pool". This first method would probably be a bit tedious to set up, but would provide a lot of flexibility.
Option 2) As I previously mentioned, create a dummy actor. From here, you can set the actor's Max HP based on a variable, which we will set it from the "Max HP Pool" variable we created. Now whenever a party member is hurt, you'll need to "change HP" for the dummy actor. You can create conditional branches depending on the state of this dummy actor's current HP. This option is likely pretty easy to set up, but having an invisible actor could cause some problems since the engine expects all actors to be used - but it's probably easier to find a plugin to fix that, rather than find a plugin to merge HP. This also depends on how your game is built, it may not cause any problems at all. (Alternatively, you could come up with some narrative reason to have an unused actor in the party. You could make the dummy actor visible, maybe call him "Stand" and say he's the party stand that protects everyone, or some dumb lore excuse like that - get creative)
Option 3) This is sort of the inverse of option 2. Instead of setting the "Max HP Pool" variable to a dummy actor, instead you set it to your party leader. In this option, we need to change what actors Max HP contribute to the "Max HP Pool" variable - otherwise, if you don't, when you set the "Max HP Pool" variable to control the player character's HP you'll get a positive feedback loop. So we need to create a dummy actor again, but this actor is going to be a copy of your player character. This copy of the player character will level up normally, and thus he will feed his Max HP value to the "Max HP Pool" variable, while the REAL player character
will not feed his Max HP into the "Max HP Pool" variable. So in this method you are feeding the dummy actor's Max HP + other party member's Max HP into the "Max HP Pool" variable, and then setting the player character's max HP from the "Max HP Pool" variable. Like option 2, it has the same inherent problems and benefits, but depending on your game's direction this option may be more fitting for your game than option 2.