EPDGaffney Posted October 22, 2017 Share Posted October 22, 2017 I'm sorry, this must have been asked before but I've been searching for ages and nothing seems to work. I want my NPC to run to a corpse, play an idle, and start his next package via an AddScriptPackage in the result script. I can get him to use the furniture markers, like leaning against a wall, but I want him to do the mourning one or the sad head-shaking one or something like that. How is this normally done? Thanks. Link to comment Share on other sites More sharing options...
uhmattbravo Posted October 22, 2017 Share Posted October 22, 2017 http://geck.bethsoft.com/index.php?title=PlayIdle That can probably explain it better than I can Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 23, 2017 Author Share Posted October 23, 2017 (edited) Thanks. I tried that days ago and must have done it wrong. I've tried a few methods from there, and the only thing that's worked is using a furniture marker and a Find package. If I used the PlayIdle command, where would that script go in the above situation? Once he gets to the corpse, he should play the idle for a certain amount of time, and then he should start the last package. More information if needed or wanted:The last package works great and returns him to his standard Sandbox and Wander packages after the time expires. If I use an idle marker in the penultimate package, or a header or X marker along with package idles or the OnEnd Idle, he goes to the right spot and then either leaves (skipping the last package entirely) or never loads the last package but stands there for ever. It doesn't set any of the variables, either. The package is apparently just not technically finishing. Testing it with a furniture marker however, it works fine. It's just that the animation looks ridiculous. Either using idle markers correctly or learning how to add other idles to a custom furniture marker would solve this, or knowing where to use PlayIdle and how to make it load the last package after some time. Thanks again. Edit: I'm about to try the last post here, but I did that earlier and I forget why it didn't work or what I didn't understand. Think I get it now, but I may not once I'm in the menus.https://forums.nexusmods.com/index.php?/topic/179410-is-it-possible-to-create-a-custom-furniture-idle-marker/ Edit 2: So, that kind of worked. However, I tested a couple of times and the first two times, he did activate my new custom furniture marker for the correct amount of time, but then he reverted to his default sandbox package rather than running the result scripts. The third time I tested, I spoke to him during the mourning idle portion of the package in question, and then for whatever reason, after the set amount of time doing that idle (which he resumed after I spoke to him), he did in fact run the result scripts. I have no idea why this happened. I tried to test again but it crashed and I need to go for the moment. Edit 3: Tested some more. He always loads the last package if I speak to him during my custom idle for him, and never does so otherwise. Funny stuff, I'd say. Edited October 23, 2017 by EPDGaffney Link to comment Share on other sites More sharing options...
Mktavish Posted October 23, 2017 Share Posted October 23, 2017 (edited) I'm not sure , but sounds like something else with the npc is tripping it up ... simply said because you have a lot of stuff happening with this npc. IDK really ... But what if you simplified things for that scene, and tried a little switcheroo behind the scenes trickery. In otherwords , make a duplicate of this npc , disable / enable between the 2 at some point ... then just having the second copy handle the mourning scene and that dialogue at that point ? Hire a stunt double for them so to speak ... or in this case a method actor to fill in :laugh: Edited October 23, 2017 by Mktavish Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 23, 2017 Author Share Posted October 23, 2017 I've considered that for other reasons but in this case, I have my doubts that it would fix this particular problem. If I can't work it out any other way, it is something to try. Link to comment Share on other sites More sharing options...
uhmattbravo Posted October 23, 2017 Share Posted October 23, 2017 Would using playIdle in an OnActivate block on the corpse work? You could use IsActionRef to check for the actor you're trying to have react to it. It's hard to tell what's causing the parts not to trigger in a complex scene like that. Link to comment Share on other sites More sharing options...
EPDGaffney Posted October 23, 2017 Author Share Posted October 23, 2017 I'll try that, Matt. If you feel inclined to offer an explanation on how or point me to something you know you've seen, great. Otherwise, I imagine it's googleable and I'll find it when I get back to this in a few hours. But an alternative has struck me: he has to find a note on this corpse as well. That wasn't available with the Find package that I saw, but perhaps I can fake that, have him visibly interact with the corpse by grabbing some item labelled unplayable from it, and then load the last package. Doesn't seem to have the same impact on the player as playing a reäction animation at the corpse but is probably safer. Incidentally, would you know a way to play an animation once at the corpse and then load the last package without looping that animation? I'm kind of a beginner on scripting in Gamebryo, so I apologise for that, but I do learn fast, so I hope it's not too inconvenient. Thanks. Link to comment Share on other sites More sharing options...
uhmattbravo Posted October 24, 2017 Share Posted October 24, 2017 Scripting the corpse to trigger the animation should be relatively simple: Begin OnActivate If isActionRef (actor's RefID here) == 1 PlayIdle (idle's editor ID) Else Activate Endif End I'm not sure how to prevent it from looping if it is, because I've been having pretty much the opposite problem: For the life of me, I can't get idles I made to loop at all. Link to comment Share on other sites More sharing options...
Mktavish Posted October 24, 2017 Share Posted October 24, 2017 (edited) Of course an idle wont loop with begin on Activate. Begin Gamemode or one of the other multi read line blocks would do it. Yes I luv begin OnActivate too ... but it is ... one time read. I'm surprised you don't see it UhMatt. Cuz you introduced me to nested script. The concept ... I wish I could pull up the particular post. But ... now I just make scrap vehichles Edited October 24, 2017 by Mktavish Link to comment Share on other sites More sharing options...
Mktavish Posted October 24, 2017 Share Posted October 24, 2017 (edited) A question ... Is the amphibious troop transport going to end up being something in your mod ?Or was it for something completely different ? cuz i'd have to say .... that vehicle is not bad addition to the choice of drivable statics I have 2 more soon. The roadster , which is sorta lookin like a dune buggy ... will see.Then the carriage. Which I am revamping .... the wheels Edited October 24, 2017 by Mktavish Link to comment Share on other sites More sharing options...
Recommended Posts