Sadly, it seems that they work only somewhat but not so that I can use and trust them.
Anyone know anything about these? They are part of the include script “ginc_item”.
To explain in more detail:
The function RememberEquippedItems(oCreature); is run on all companions. Then they are teleported to a new area where their hands and head are unequipped.
At a later stage you leave this area and when entering a new area I run a RestoreEquippedItems(oCreature); . When testing this with SendMessageToPC it seems that everything is run, however, only two of the four companions in the party are again equipped with the weapons they had equipped before moving to the first area.
Thanks for the reply, @kevL_s ! I was going nuts over this and I thought I did something wrong even though everything told me I didn’t. Glad to see that it wasn’t me this time.
I tried using the buggy restore function just before running a gui script:
void SelectYourParty()
{
ShowPartySelect(GetFirstPC(),
TRUE, // modal
"jump_exit", // callback script on Accept
TRUE); // show close button
}
For some reason when doing that, the gui wouldn’t run. As soon as I removed the RestoreEquippedItems(oCreature); from the script with the SelectYourParty() the GUI would show again. Any thoughts about that?
my guess (and im not looking at it too hard atm) is that the stock version of RestoreEquippedItems() has a potential infinite loop. i think it possible that the engine threw a TMI (too many instructions) and shut the rest of the script down at that pt.