IonDune Posted July 20, 2007 Share Posted July 20, 2007 Using this guide, I made a lectern that was capable of summoning a choice of 4 creatures. After following the tutorial and making changes for it to fit my design, I came up with this script: Quote Scriptname SummoningStation ref Minotaurref Xivilairef Lichref Stormshort aliveshort buttonshort stage begin onactivate set Minotaur to SummonMinotaurID.createfullactorcopy set Xivilai to SummonXivilaiID.createfullactorcopy set Lich to SummonLichID.createfullactorcopy set Storm to SummonStormID.createfullactorcopy MessageBox "Which monster would you like to summon?", "Minotaur", "Xivilai", "Lich", "Storm Atronach", "Cancel" set stage to 1 set alive to 1 end begin gamemode set Button to getButtonPressed if stage == 1 && button == 0 Minotaur.moveto killroommarker if alive if Minotaur.getdead set alive to 0 Minotaur.deletefullactorcopy endif endif set stage to 0 Return elseif stage == 1 && button == 1 Xivilai.moveto killroommarker if alive if Xivilai.getdead set alive to 0 Xivilai.deletefullactorcopy endif endif set stage to 0 Return elseif stage == 1 && button == 2 Lich.moveto killroommarker if alive if Lich.getdead set alive to 0 Lich.deletefullactorcopy endif endif set stage to 0 Return elseif stage == 1 && button == 3 Storm.moveto killroommarker if alive if Storm.getdead set alive to 0 Storm.deletefullactorcopy endif endif set stage to 0 Return elseif stage == 1 && button == 4 set stage to 0 Return endifEnd An ingame test soon showed that it worked nearly perfectly. I have the Multiple Creature Summoning mod, so I was able to summon multiple creatures and soon started a large brawl. As the fight went on, however, and creatures began to die, their bodies remained there and I was able to loot them. From what I could tell from the tutorial and code, the creatures were supposed to disappear after death. Is this a problem in my understanding, my mod, or my script? And is there a way to fix it? Thanks for you time! Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 20, 2007 Share Posted July 20, 2007 IonDune said: I'm not sure, but I think "deletefullactorcopy" would only work if you had just one such activator since it's based off the base creature or something. Try "ref.removeme" instead or "ref.disable". Not too sure, never liked the createfullactorcopy method of spawning. Link to comment Share on other sites More sharing options...
IonDune Posted July 20, 2007 Author Share Posted July 20, 2007 Vagrant0 said: IonDune said: I'm not sure, but I think "deletefullactorcopy" would only work if you had just one such activator since it's based off the base creature or something. Try "ref.removeme" instead or "ref.disable". Not too sure, never liked the createfullactorcopy method of spawning. I tried both removeme and disable, and even disabled the multiple creature summoning mod, but the bodies still remained there. Are there, perhaps, other methods of summoning that would work better in this situation? Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 20, 2007 Share Posted July 20, 2007 IonDune said: I think the problem might be the conditions in the script which are related to removing the creature after death. begin onactivate set Minotaur to SummonMinotaurID.createfullactorcopy set Xivilai to SummonXivilaiID.createfullactorcopy set Lich to SummonLichID.createfullactorcopy set Storm to SummonStormID.createfullactorcopy if stage != 1 MessageBox "Which monster would you like to summon?", "Minotaur", "Xivilai", "Lich", "Storm Atronach", "Cancel" set stage to 1 set alive to 1 endif end begin gamemode set Button to getButtonPressed if stage == 1 && button == 0 Minotaur.moveto killroommarker if alive == 1 if Minotaur.getdead == 1 set alive to 0 Minotaur.deletefullactorcopy set stage to 0 endif endif Return Moved the set stage to a different spot too so that each activator can only spawn one creature at a time. Spawning two may have broken the cleanup since the button condition would no longer be true. Addtionally, if the creatures being spawned are unique references that you can edit and attach scripts to, you may wish to add the following script to them. scn mobdeathcleanup ref self begin onload set self to getself end begin onactivate if self.getdead == 1 return endif end begin ondeath self.removeme end However since we're using the full actor copy method, the scripting may not be present in the copies. In which case, you may have to do an ability script which does the same sort of stuff, or adjust the spawning script to work off a placeatme. Link to comment Share on other sites More sharing options...
IonDune Posted July 20, 2007 Author Share Posted July 20, 2007 Vagrant0 said: That didn't work either. I used this as my new script: Scriptname SummoningStation ref Minotaur ref Xivilai ref Lich ref Storm short alive short button short stage begin onactivate set Minotaur to SummonMinotaurID2.createfullactorcopy set Xivilai to SummonXivilaiID.createfullactorcopy set Lich to SummonLichID.createfullactorcopy set Storm to SummonStormID.createfullactorcopy if stage != 1 MessageBox "Which monster would you like to summon?", "Minotaur", "Xivilai", "Lich", "Storm Atronach", "Cancel" set stage to 1 set alive to 1 endif end begin gamemode set Button to getButtonPressed if stage == 1 && button == 0 Minotaur.moveto killroommarker if alive == 1 if Minotaur.getdead == 1 set alive to 0 Minotaur.deletefullactorcopy set stage to 0 endif endif Return elseif stage == 1 && button == 1 Xivilai.moveto killroommarker if alive == 1 if Xivilai.getdead == 1 set alive to 0 Xivilai.deletefullactorcopy set stage to 0 endif endif Return elseif stage == 1 && button == 2 Lich.moveto killroommarker if alive == 1 if Lich.getdead == 1 set alive to 0 Lich.deletefullactorcopy set stage to 0 endif endif Return elseif stage == 1 && button == 3 Storm.moveto killroommarker if alive == 1 if Storm.getdead == 1 set alive to 0 Storm.deletefullactorcopy set stage to 0 endif endif Return elseif stage == 1 && button == 4 set stage to 0 Return endif End And attached that other script to the reference creature, but they were still there after death. The only difference was that now i could no longer use the altar a second time after first killing one summoned creature. Also, I've been using the console command "kill" to kill the creatures. Could that be having an adverse effect on the script? EDIT: I think I've found a way for it to work adequately enough for my needs. I changed back to my original script that allowed multiple summonings, and am changing the inventory of my references to contain nothing (or in one case, my minotaur lord, just a weapon) so that that don't have anything worth looting anyways. I will then make a pit off to the side of the room for players to throw corpses in to, just for aesthetic value. This should work fine enough. Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 20, 2007 Share Posted July 20, 2007 Hmm, don't know what the issue is, know removeme works on death somehow, my shephards ring mod has it like that... Might want to check it out since it also has some spawning scripting. Think the problem might be related to some sort of referencing problem, but not sure what. Link to comment Share on other sites More sharing options...
IonDune Posted July 21, 2007 Author Share Posted July 21, 2007 Vagrant0 said: Hmm, don't know what the issue is, know removeme works on death somehow, my shephards ring mod has it like that... Might want to check it out since it also has some spawning scripting. Think the problem might be related to some sort of referencing problem, but not sure what. Thanks, I will look into that. I'm thinking that it is probably fine as it is because it is more for novelty value, as I highly doubt that myself or anyone who uses the mod will actually have much use for it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.