senterpat Posted January 24, 2019 Share Posted January 24, 2019 So I'd like to add some training dummies that allow you to level your pickpocketing skill, with the dummies pockets attached to a bell. The only thing is I'm not quite sure how to accomplish this. I'm having trouble wrapping my mind around how it would all work, so hoping from some help here. Mostly I can't figure how to open the linked references inventory, treating it as pickpocket so that perks/potions apply. And then allowing the target to be pickpocketed immediately after.. Any advice would be appreciated. Link to comment Share on other sites More sharing options...
foamyesque Posted January 25, 2019 Share Posted January 25, 2019 I don't know about ringing a bell, but I set up some custom mannequins that can be pickpocketed. Basically, the pickpocket routine is baked into the code and the only way I ever found to make it fire is the player sneak-activating a valid pickpocket target. The default mannequins are set up to not allow you to do this, but if you make a mannequin directly activateable instead of having the activation be passed through an invisible activator, the usual actor options of Talk and Pickpocket will appear, even if the mannequin's AI is disabled (as it should be). You can use a perk to filter out the non-sneak activation prompt, and in order to be able to activate the mannequin at all it will have to have a name (blank names are treated as un-activatable by the game, which is why the default mannequin forms don't have one). Link to comment Share on other sites More sharing options...
senterpat Posted January 26, 2019 Author Share Posted January 26, 2019 Well I've been messing with it, but I cannot get the AI to reset once the pickpocket fails. Do you know how to do this? I attempted to use reset on a script attached to the mannequin but to no avail. What I have so far is below, any help is appreciated :D Scriptname patMannakinScript extends Actor ObjectReference Property TheBell auto EVENT OnCellLoad() Utility.wait(0.25) self.EnableAI(FALSE) EndEvent Event OnCombatStateChanged(Actor akTarget, int aeCombatState) if (akTarget == Game.GetPlayer()) if (aeCombatState == 0) Debug.Trace("We have left combat with the player!") elseif (aeCombatState == 1) Debug.Trace("We have entered combat with the player!") self.Reset() TheBell.PlayGamebryoAnimation("Ring") Utility.wait(2) TheBell.PlayGamebryoAnimation("Stop") endIf endIf endEvent Link to comment Share on other sites More sharing options...
foamyesque Posted January 27, 2019 Share Posted January 27, 2019 CombatStateChanged will never fire, because the AI is disabled, so it can't change combat states. I am not sure how the pickpocket lockout works nor how you'd catch a failed pickpocket, but I'd look at the alarm and crime faction systems as a starting point. Link to comment Share on other sites More sharing options...
senterpat Posted January 27, 2019 Author Share Posted January 27, 2019 (edited) Hmmm, when I was testing with the AI disable, it would still show up on the compass as a red dot when I failed. Maybe to track it I won't use vanilla objects, I'll make "dummy" variants that are removed afterwards. Will OnClose trigger on actors? If so I could use the lack of a dummy object in the PC inventory as a way to detect if the pickpocket failed. If no response I'll test it out once I get home. Thanks for your help foamyesque!! edit: Nevermind, looked it up on the wiki and OnClose doesn't look like it works... Maybe setting up a timer to check if the player is in menu mode or not? edit2: So using a perk entry point on run immediately I can get a function to run in my quest script when I activate the mannequin. I just am unsure what functions to use. I'm gonna play with it some more, I think I can get it working properly tho. Edited January 28, 2019 by senterpat Link to comment Share on other sites More sharing options...
senterpat Posted January 29, 2019 Author Share Posted January 29, 2019 So I just can't get this to compile for some reason, am I using the Reset function wrong? Function patMannakinFunction() if Utility.isinmenumode() Utility.wait(0.01) patMannakinFunction() else if game.getplayer().getitemcount(patDummyItems) == 0 int instanceID = BellSound.play(TheBell) TheBell.PlayGamebryoAnimation("Ring") MannakinReference1.Reset() endif endif endfunction Link to comment Share on other sites More sharing options...
foamyesque Posted January 30, 2019 Share Posted January 30, 2019 It's a lot easier to diagnose compilation problems if you post the compiler error. Why in the world are you using a recursive call to check for menumode? That's going to cause a stack dump. Link to comment Share on other sites More sharing options...
Recommended Posts