Author Topic: RE: Question about UD Events and Summoned Creatures  (Read 435 times)

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: Question about UD Events and Summoned Creatures
« on: August 20, 2011, 05:02:02 pm »


               Trying to make a customized version of Creeping Doom that summon multiple swarms as opposed to creating an AOE. I have it so that the creature template uses a UD Post Spawn event to apply the AOE - which works great if you just place the template in the area. However, the post spawn doesn't seem to fire if the creature is spawned through EffectSummonCreature()...

Any way around this?
               
               

               


                     Modifié par Pstemarie, 20 août 2011 - 04:07 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: Question about UD Events and Summoned Creatures
« Reply #1 on: August 20, 2011, 06:53:35 pm »


               Got it working so that the AOE is applied to the summoned creature. But now the AOE affects the master of the summoned swarms. I added a debug string to log the name of the AOE Creator which comes back as OBJECT_INVALID?
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
RE: Question about UD Events and Summoned Creatures
« Reply #2 on: August 20, 2011, 07:02:13 pm »


               Pstemarie - have you experimented with the Spawn event for a summoned creature? Determine whether the spawn event runs on a summoned creature. If Summon Effects bypass the spawn event, I'd rewrite the spell you are making - primarily by replacing the summon effect with a custom function that explicitly creates a creature object, and adds all appropriate tags to identify it as a summoned critter.

[edit] nevermind. apparently you followed up with a post while I was replying.
               
               

               


                     Modifié par henesua, 20 août 2011 - 06:05 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
RE: Question about UD Events and Summoned Creatures
« Reply #3 on: August 20, 2011, 11:36:07 pm »


               GetEffectCreator does not work the same way for EOA as they do for other effects.

From The Lexicon
The creator of the effect (GetAreaOfEffectCreator()) is the caller of the script that the effect is applied from - as this is not an effect if applied to a location, it will not have an GetEffectCreator().


               
               

               


                     Modifié par Lightfoot8, 20 août 2011 - 10:36 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: Question about UD Events and Summoned Creatures
« Reply #4 on: August 21, 2011, 11:31:32 am »


               Got it!

Had to create a separate spell to create the AOE, which I then fire from the Post-Spawn Event using ActionCastSpell. This way the AOE Creator is assigned to the Summoned Swarm that casts the "spell". I also had to change the targeting on the Creeping Doom AOE Enter and HB Events so that it only affected enemies.

So basically my version of Creeping Doom works like so:

The caster summons 1 centipede swarm per two caster levels (maximum 5 swarms) that deal 2d6 damage to any enemy caught within them. Creatures caught within the swarm must make a Fort save or be poisoned (DC 13, 1d4 Dex / 1d4 Dex).

I've got multi-summoning working so that the limitation on the number of summoned creatures is ignored. However, there are two minor glitches - you always wind up with one less summoned creature than you should (although you always get at least one creature) if casting a summons that call more than one creature AND whenever you cast a new summon spell, one of your already summoned creatures is unsummoned. But I can live with these.