TheCutSnake Posted December 28, 2017 Share Posted December 28, 2017 (edited) Hi all. I have a script attached to a holotape that calls in an actor, who then performs an idle. The problem is that I want it to begin before I close the pip-boy. I realise that the idle won't 'play' until time is restored, but I was hoping that the npc in question wouldn't start off standing where I've called him, as it really breaks immersion. The npc in question is actually somebody the player has recently killed, so I've tried reset, resurrect, and getactorbase, all with the same result. He won't do any scipt functions while the pip-boy is up. Is there another way to call in an npc and let me perform other script functions (unequip, etc) before the pip-boy is closed? Any help would be much appreciated. Edit - It might be worth mentioning that I intend for the NPC to die after performing the idle. Edited December 28, 2017 by Cut Snake Link to comment Share on other sites More sharing options...
Reneer Posted December 29, 2017 Share Posted December 29, 2017 (edited) Basically there isn't much you can do because you're in "MenuMode" while the Pipboy is active, so actors and such basically get stuck in time. A potential workaround would be to have a copy of that actor already at the location but made invisible, AI disabled, and playing your idle and you would just need to make them visible and start up their AI. Edited December 29, 2017 by Reneer Link to comment Share on other sites More sharing options...
Carreau Posted December 29, 2017 Share Posted December 29, 2017 Closing the pip by generates an event. Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening) might be your ticket. Register it and then when it gets called, check that asMenuName is âPipboy menuâ and abOpening is false. Be sure to have the event unregistered after youâve spawned your npc. Quests automatically unregister after they stop. Link to comment Share on other sites More sharing options...
TheCutSnake Posted December 30, 2017 Author Share Posted December 30, 2017 (edited) Thanks for the replies guys, I appreciate the help. Reener, I assume by invisible you mean disable/enable? btw I'm using a combination of the advice from both of you :) Edited December 30, 2017 by Cut Snake Link to comment Share on other sites More sharing options...
TheCutSnake Posted December 30, 2017 Author Share Posted December 30, 2017 OK, the problem I'm currently stuck on is that the NPC is immediately hostile and interrupts the idle in order to attack me. I realise he's hostile to me (the player) because I killed him, but I cannot make him not-hostile. I've tried resurrecting him, resetting him, and calling in a copy of him, all with the same result. I've tried adding him to the player faction and even adding a default stay no combat package via alias. I believe I should be able to fix the issue via setactorvalue aggression, but I cannot get it to compile. Any help would be much appreciated as I've been going in circles for days now and my brain has turned to mush :) Link to comment Share on other sites More sharing options...
Carreau Posted December 30, 2017 Share Posted December 30, 2017 I had a similar issue with a companion mod I was working on. The NPC was constantly hostile. The behavior was odd because it wasn't hostile until I started messing with affinity and crime factions. My work around was to add it to the player friend faction. Link to comment Share on other sites More sharing options...
TheCutSnake Posted December 30, 2017 Author Share Posted December 30, 2017 Carreau, that was the prompt I needed! Of course he was still fighting me, as his entire faction was now hostile. My fix for that was RemoveFromAllFactions, followed by AddToFaction(PlayerFriendFaction) Now I can work with him without fear of attack. Thanks again. Link to comment Share on other sites More sharing options...
Reneer Posted December 30, 2017 Share Posted December 30, 2017 Thanks for the replies guys, I appreciate the help. Reener, I assume by invisible you mean disable/enable? btw I'm using a combination of the advice from both of you :smile:I meant using something like SetAlpha. Link to comment Share on other sites More sharing options...
TheCutSnake Posted December 31, 2017 Author Share Posted December 31, 2017 Thanks Reener, looking into that now. Link to comment Share on other sites More sharing options...
Recommended Posts