PJMail Posted January 11, 2022 Share Posted January 11, 2022 I have played around with this, and searched all these forums, and this function does not work as documented on NPC's. The console version works fine (slm NPCpid), but scripting the above function just sits there until you press return and confirm to exit.I have tried NPCref.SetHasCharGenSkeleton() before - no difference. Has anyone got looksmenu to work for an NPC via script? ThanksPJM Link to comment Share on other sites More sharing options...
PJMail Posted April 11, 2022 Author Share Posted April 11, 2022 (edited) Finally got this to work - needed them to have "playerkeyword" and be 'sitting' at a "NPCSinkFacegenMarker" instance - as well as the rest of the chargen stuff...e.g. Keyword PlayerKeyword = Game.getform(0x99306) as Keyword NPC.AddKeyword(PlayerKeyword) Furniture NPCSinkFacegenMarker = Game.getform(0x17986C) as Furniture akFaceGenFurn = NPC.PlaceAtMe(NPCSinkFacegenMarker as Form, 1, False, False, True) NPC.SetHasCharGenSkeleton(True) NPC.ChangeAnimFaceArchetype(None) Utility.Wait(2.0) NPC.SnapIntoInteraction(akFaceGenFurn) Utility.Wait(2.0) Self.RegisterForMenuOpenCloseEvent("LooksMenu") Game.ShowRaceMenu(NPC as ObjectReference , 1, None, None, None) (and then clean up everything on the "looksmenu" close event). Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening) If ((asMenuName == "LooksMenu") && !abOpening) Self.UnRegisterForMenuOpenCloseEvent("LooksMenu") akFaceGenFurn.Delete() NPC.SetHasCharGenSkeleton(False) Keyword AnimFaceArchetypePlayer = Game.getform(0xD755E) as Keyword NPC.ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) Keyword PlayerKeyword = Game.getform(0x99306) as Keyword NPC.RemoveKeyword(PlayerKeyword) Endif Endevent Now my problem is the first time I try this after resuming a game, there is no "looksmenu" overlay onscreen. If I press return I get the normal looksmenu 'cancel/confirm' changes, but can't obviously make any changes. If I immediately run the script again it all works fine. Any ideas?Thanks. Edited April 11, 2022 by PJMail Link to comment Share on other sites More sharing options...
Zorkaz Posted April 11, 2022 Share Posted April 11, 2022 Have you tried game.setcameratarget() too?Just a wild guess though Link to comment Share on other sites More sharing options...
PJMail Posted April 11, 2022 Author Share Posted April 11, 2022 I haven't because in both cases I was looking at the target. In fact the script is on the target so I have to face them to get the "E) Talk" (activate) option.Everything happens the same each time I try it EXCEPT the first time I get no menu (overlay) down the bottom with "F) Face B) Body etc" - however I AM in looksmenu as it still expects me to press return to exit. Link to comment Share on other sites More sharing options...
Recommended Posts