Hello everyone. I have a script attached to a persistent feat given to every creature (so it fires off after a rest as well).
This script is meant to restore the mana of the one who rests to full, or of the whole party in single player.
oChar = OBJECT_SELF;
if (GetLastPCRested() == oChar)
{
object oNPC = GetFirstFactionMember(oChar, FALSE);
while (GetIsObjectValid(oNPC) == TRUE)
{
nTOTAL = GetLocalInt(oNPC, "CLANGEDDIN_MANA_MAXIMUM");
SetLocalInt(oNPC, "CLANGEDDIN_MANA_CURRENT", nTOTAL);
oNPC = GetNextFactionMember(oChar, FALSE);
}
}
This script works fine for single player. However, I'm afraid that for multi player it may not work as intended and that it would restore the mana of other player characters who have not rested as well.
Anyone got any idea on how I should modify the above script to make it compatible with multi player? Keep in mind that when I rest in multiplayer, I want to restore the MP of the Player owned character, all his associates AND the NPC companions (like the campaign characters Bishop, Ammon ecc...) that can be controlled by the Player character that rested.





Retour en haut






