Jump to content

teleporting and then resurrecting NPC - scriping help needed


Elleh

Recommended Posts

Thanks for the tip, IsharaMeradin, the script in the follower quest has been very instructive :-)

So it seems there is a "SetOutfit" function, but strange enough there doesn't seem to be a "GetOutfit" or any other function to "read" what items the deceased victim had equipped. (a GetOutfit function does seem to exist in SKSE, but I don't want to go there)

I think the "naked" problem arises because during gameplay the player has taken items from the followers inventory that belonged to the defaultoutfit, and exchanged them for better ones. After resurrection the follower tries to change back into his defaultoutfit, but those items are gone, so he ends up naked.

So right now I just check in the scrtipt if the target of the resurrection belongs to the PlayerHousecarlFaction or PotentialFollowerFaction and give them the default Housecarloutfit to wear after resurrection.

 

akTarget.SetOutfit(PlayerHousecarlOutfit)

 

So now they're not naked any more (yay!) plus any precious items they received from the player remain in their inventory (thanks to the switch chest trick), even if they still won't equip their best items till we walk through a door. But hey, at least they're alive again, so they shouldn't complain too much!

I'll keep you posted if I find a more precise way to restore the equipped items.

thanks again

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...