tonycubed2 Posted March 17, 2012 Share Posted March 17, 2012 This forum rocks. I could not have done my mod without you guys. I have a ring in the mod that when equipped summons the "Sandman" which is really meant to be a ingame menu system to tweak the mod. Took me days to get the ingamemenu working. Summoning is easy, I just use the "onequipped" event. But how do I dismiss him? I can attach a unequipped to the ring but it would be much better if when the dialogue stops the dude poofs out. I could not find any event for "ondialogueend". I cant even get teh following to compile, says no such function: ActorBase Property sanddude AutoEvent OnUnequipped(Actor akActor)sanddude.Kill()EndEvent My summon script is below. Scriptname summonsandman extends ObjectReference ActorBase Property sanddude Auto Event OnEquipped(Actor akActor) ObjectReference PlayerRef = Game.GetPlayer() PlayerRef.PlaceActorAtMe(sanddude,1) endEvent Link to comment Share on other sites More sharing options...
GomuGomu64 Posted March 17, 2012 Share Posted March 17, 2012 Have you defined the sanddude property? Link to comment Share on other sites More sharing options...
tonycubed2 Posted March 17, 2012 Author Share Posted March 17, 2012 Yup. That is how I get him to spawn when the ring is worn. It seems the kill function only works with certain evetns and conditions, and on eventunequipped is not one of them. So I need some other way to make him go away... Link to comment Share on other sites More sharing options...
tonycubed2 Posted March 17, 2012 Author Share Posted March 17, 2012 Yup. That is how I get him to spawn when the ring is worn. It seems the kill function only works with certain evetns and conditions, and on eventunequipped is not one of them. So I need some other way to make him go away... Link to comment Share on other sites More sharing options...
tunaisafish Posted March 17, 2012 Share Posted March 17, 2012 (edited) Try this... Scriptname summonsandman extends ObjectReference ActorBase Property sanddude Auto Actor dudeInstance Event OnEquipped(Actor akActor) dudeInstance = Game.GetPlayer().PlaceActorAtMe(sanddude,1) endEvent Event OnUnequipped(Actor akActor) dudeInstance.Kill() EndEvent Edit: silly typo sandInstance -> dudeInstance Edited March 17, 2012 by tunaisafish Link to comment Share on other sites More sharing options...
tonycubed2 Posted March 17, 2012 Author Share Posted March 17, 2012 Will try and report back! My two little girls have dragged me outside for a walk. Sigh... Link to comment Share on other sites More sharing options...
tonycubed2 Posted March 17, 2012 Author Share Posted March 17, 2012 Man, it was funny! I had him set as "essential" so he writhed and groaned in pain for a minute while getting over it and not dying! Very cool and usable somewhere. So I took off the essential part and yes, he died. But he stayed right there, dead! Searchable and all. I need him to go away... is there a command for get rid of dead body? Link to comment Share on other sites More sharing options...
tonycubed2 Posted March 18, 2012 Author Share Posted March 18, 2012 OK, Tuna is a fish , the answer was to use dudeinstance.disable instead of kill. he was gone in a flash. Would not have worked though without your code, since I had tried already so all credit is yours. I also gave you public recognition in two places on my humble mod page. thanks again! Link to comment Share on other sites More sharing options...
tunaisafish Posted March 18, 2012 Share Posted March 18, 2012 lol @ essential. Glad it worked out :) Where did you release it? Just one more thing, when you spawn things, you're also responsible for the cleanup.So while disable() hides it from view, it will still take space in savefiles.Follow the disable() up with a delete() and all's good. Oh, and you've not finished with it even then.Next comes the requests of "This is cool, but..." Link to comment Share on other sites More sharing options...
tonycubed2 Posted March 18, 2012 Author Share Posted March 18, 2012 Tunaisafish: the mod is here, at http://skyrim.nexusmods.com/downloads/file.php?id=12452 The in game menu thanks to you all should be ready late tonight, almost done with it. The mod has been working for a while now. Link to comment Share on other sites More sharing options...
Recommended Posts