sarac Posted May 15, 2010 Share Posted May 15, 2010 Hello everyone,I need help with script for multiple creature summon. I tried using some tutorials but i couldn't make a working script.What i need is a script for spell which will summon 5 zombies at once, for example...So please if can someone help me out and write it here, i would be very thankful!! ;) P.S. Don't link me to any pages, since i tried the most... :P Link to comment Share on other sites More sharing options...
GreatLucifer Posted May 15, 2010 Share Posted May 15, 2010 What you could do is instead of using the standard summoning-type spell, script it and use the placeatme command to place a zombie / your own creature nearby. These will, however, not expire and may still turn on you, making them more dangerous for yourself.. Link to comment Share on other sites More sharing options...
sarac Posted May 15, 2010 Author Share Posted May 15, 2010 Yeah, well that won't work, since i need them to work as normal summoned creatures... :/ Link to comment Share on other sites More sharing options...
The_Vyper Posted May 15, 2010 Share Posted May 15, 2010 Yeah, well that won't work, since i need them to work as normal summoned creatures... :/Follow this tutorial from the CS Wiki. Granted, this only tells you how to summon one creature, but if you make five creatures and five summon scripts (one for each creature), you can put all five summon scripts into one spell. I've tried this and it works. Maigrets used the same technique for her Vampire Bats mod. Link to comment Share on other sites More sharing options...
icecreamassassin Posted July 21, 2011 Share Posted July 21, 2011 Yeah, well that won't work, since i need them to work as normal summoned creatures... :/Follow this tutorial from the CS Wiki. Granted, this only tells you how to summon one creature, but if you make five creatures and five summon scripts (one for each creature), you can put all five summon scripts into one spell. I've tried this and it works. Maigrets used the same technique for her Vampire Bats mod. I am trying something similar using the summoned creature tutorial and basically expounded upon it by making the script summon multiple creatures instead (just doubling up on each section, adding extra short variables, etc) All seems to work ok, but when the spell wears off (which continues past their death for some reason) the script kills me rather than the reference of the creature. Here is what I have: ScriptName CRmasterofskullsscript float timer float fade short playonce short playonce2 short playonce3 ref SUMN ref SUMN2 ref SUMN3 Begin ScriptEffectStart ;Set temp reference for scripting. ;Allows faster transition of script as template. Also allows for leveled summon. set SUMN to CRskeleton003 set SUMN2 to CRskeleton004 set SUMN2 to CRskeleton005 ;Reset our creature if re-summoned before time runs out on spell SUMN.disable SUMN2.disable SUMN3.disable ;Now we move our creature to the Player ;Move the creature reference to the worldspace of the Player SUMN.moveto Player 30 30 10 SUMN2.moveto Player 0 30 10 SUMN3.moveto Player 30 0 10 ;Make our creature visible and active SUMN.enable SUMN2.enable SUMN3.enable set fade to 1 ;Resets the alpha fade variable to 1 End Begin ScriptEffectUpdate if ( timer > 30 ) ;Creature is dead and fade timer passed ;Move our creature back to it's holding cell SUMN.kill SUMN2.kill SUMN3.kill SUMN.moveto CRskeletonroomcenter 0 0 10 SUMN2.moveto CRskeletonroomcenter 0 10 10 SUMN3.moveto CRskeletonroomcenter 10 0 10 ;Reset our creature if dead SUMN.resurrect SUMN2.resurrect SUMN3.resurrect ;Set our creature to an unprocessed state SUMN.disable SUMN2.disable SUMN3.disable endif ;Adjust timer state for early fade/disable upon death if ( SUMN.getdead == 1 ) && ( timer < 28 ) set timer to 28 endif if ( SUMN2.getdead == 1 ) && ( timer < 28 ) set timer to 28 endif if ( SUMN3.getdead == 1 ) && ( timer < 28 ) set timer to 28 endif if ( timer > 0.1 ) && ( playonce == 0 ) ;Play effect for creature entrance SUMN.pms effectSummonMythicDawn 1 set playonce to 1 endif if ( timer > 0.1 ) && ( playonce2 == 0 ) ;Play effect for creature entrance SUMN2.pms effectSummonMythicDawn 1 set playonce2 to 1 endif if ( timer > 0.1 ) && ( playonce3 == 0 ) ;Play effect for creature entrance SUMN3.pms effectSummonMythicDawn 1 set playonce3 to 1 endif ;Increment timer set timer to timer + GetSecondsPassed if ( timer > 28 ) && ( playonce == 1 ) ;Play effect for creature exit/death SUMN.kill set playonce to 2 endif if ( timer > 28 ) && ( playonce2 == 1 ) ;Play effect for creature exit/death SUMN2.kill set playonce2 to 2 endif if ( timer > 28 ) && ( playonce3 == 1 ) ;Play effect for creature exit/death SUMN3.kill set playonce3 to 2 endif if ( playonce == 2 ) ;Fade creature for exit/death set fade to fade - 0.03 SUMN.saa fade endif if ( playonce2 == 2 ) ;Fade creature for exit/death set fade to fade - 0.03 SUMN2.saa fade endif if ( playonce3 == 2 ) ;Fade creature for exit/death set fade to fade - 0.03 SUMN3.saa fade endif End Begin ScriptEffectFinish ;Move our creature back to it's holding cell SUMN.moveto CRskeletonroomcenter 0 0 10 SUMN2.moveto CRskeletonroomcenter 0 10 10 SUMN3.moveto CRskeletonroomcenter 10 0 10 ;Reset our creature if dead SUMN.resurrect SUMN2.resurrect SUMN3.resurrect ;Set our creature to an unprocessed state SUMN.disable SUMN2.disable SUMN3.disable End Any ideas what the script is killing me? On a side note, only one or the other of CRskeleton004 or CRskeleton005 is summoned, and not both, but CRskeleton003 summons just fine. I am thinking that somehow the script tags the player as CRskeleton004 for instance (or 005 maybe) and when the script runs out, it kills that reference (i.e. the player) I would expect though that maybe it should warp me to the holding cell but I guess that gamemode instantly stops upon the player death and hence the script comes to a screeching halt. I'm gonna play with it a bit and see what's what Link to comment Share on other sites More sharing options...
fg109 Posted July 21, 2011 Share Posted July 21, 2011 I don't see why the script would kill you either. If you have OBSE, try adding this line to the end of your ScriptEffectStart and ScriptEffectEnd blocks: MessageEX "SUMN is %n, SUMN2 is %n, SUMN3 is %n" SUMN SUMN2 SUMN3 Link to comment Share on other sites More sharing options...
icecreamassassin Posted July 21, 2011 Share Posted July 21, 2011 I don't see why the script would kill you either. If you have OBSE, try adding this line to the end of your ScriptEffectStart and ScriptEffectEnd blocks: MessageEX "SUMN is %n, SUMN2 is %n, SUMN3 is %n" SUMN SUMN2 SUMN3 I'm actually not currently using the OBSE and there should be a simple fix for this using the core code but I can't seem to figure out where the glitch is. I've stripped the code down to the original script and now I have even more troubles :P now the leveled creature (only 1) which I summon does not reset when I cast the spell again, and if it's killed it cannot be resummoned. Plus I still have my original problem of dying at the spell's expiration Link to comment Share on other sites More sharing options...
icecreamassassin Posted July 21, 2011 Share Posted July 21, 2011 I don't see why the script would kill you either. If you have OBSE, try adding this line to the end of your ScriptEffectStart and ScriptEffectEnd blocks: MessageEX "SUMN is %n, SUMN2 is %n, SUMN3 is %n" SUMN SUMN2 SUMN3 I'm actually not currently using the OBSE and there should be a simple fix for this using the core code but I can't seem to figure out where the glitch is. I've stripped the code down to the original script and now I have even more troubles :P now the leveled creature (only 1) which I summon does not reset when I cast the spell again, and if it's killed it cannot be resummoned. Plus I still have my original problem of dying at the spell's expiration Ok So I went back to square 1 and used the script as it was provided on the TESCS wiki site. It seems that the player death bug happens when the creature is a leveled monster for some reason. Also the only other remaining bug is that the spell timer remains even after all the creatures are killed, which is a minor concern since I no longer seem to DIE after it does go away :) Anyways any insight as to why a summoned creature reference would cause this? I think I may just mod the base creature to level with the player instead of using a leveled creature marker and see if that solves it. I think it has something to do with randomly generating instances of a leveled creature, it must loose the refID somehow and default to the player which causes the death (my guess at this point at least) Link to comment Share on other sites More sharing options...
fg109 Posted July 21, 2011 Share Posted July 21, 2011 I guess that could be true... Things that are spawned in the current game (eg NPCs from leveled lists) and not placed directly into the game world has a reference ID starting with FF. Try selecting them in your console. When you and the selected NPC (not sure if it has to die and respawn first) are in different cells, often it will no longer be selected because the game has given it a new reference ID. I guess it might happen even when the NPC is still in the same cell as you. Link to comment Share on other sites More sharing options...
icecreamassassin Posted July 21, 2011 Share Posted July 21, 2011 I figured it out. I don't know WHY it was doing what it was doing but I realized the only issue I was having was because of the IF check for the current conjuration level of the player that I added and I just wasn't blocking each segment of the code with the conditional. Anything that was coded improperly would cause the effects to default to the player. I ended up even causing myself to teleport to the storage cell in troubleshooting. I did just end up making the creatures leveled using the PC offset feature instead and it works perfectly. Basically I have 6 scripts tied to a spell which at conjuration 0-25 summons a skeleton warrior and a skeleton archer, at 50 you get an additional warrior, at 75 you get one more archer and 1 more warrior, and at 100 you get a lich as well. So yay, all is well :) Link to comment Share on other sites More sharing options...
Recommended Posts