Summoned creatures in a script

Post » Tue Jun 19, 2012 8:02 pm

I have to kill a summoned creature at summoning, but, in OnEffectStart, Target and Caster are both referred to player. Do you know a way to operate on the summoned creatures? Thanks.
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Tue Jun 19, 2012 8:01 pm

Possibly through a cast magic event node in the story manager and a triggered quest that fills an alias from the nearest instance of the summoned creature type to the player and has a ReferenceAlias script to kill the actor that fills it. Sounds an odd spell to summon a creature and kill it.

Easier might be to make it summon a copy of the actor you made with an actor script that kills it on initialisation.
User avatar
Vickytoria Vasquez
 
Posts: 3456
Joined: Thu Aug 31, 2006 7:06 pm

Post » Tue Jun 19, 2012 7:29 pm

Possibly through a cast magic event node in the story manager and a triggered quest that fills an alias from the nearest instance of the summoned creature type to the player and has a ReferenceAlias script to kill the actor that fills it. Sounds an odd spell to summon a creature and kill it.

Easier might be to make it summon a copy of the actor you made with an actor script that kills it on initialisation.

It's a spell like summon dreamora, but if some specific conditions are not true, the summoned creature dies.
User avatar
Jesus Lopez
 
Posts: 3508
Joined: Thu Aug 16, 2007 10:16 pm

Post » Tue Jun 19, 2012 2:09 pm

Copy the base actor then create a summon spell for your copy.

Then add an actor script not sure what event on the actor script maybe onload.

Easier to make the spell just fail under the wrong conditions.
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Tue Jun 19, 2012 10:10 am

Copy the base actor then create a summon spell for your copy.

Then add an actor script not sure what event on the actor script maybe onload.

Easier to make the spell just fail under the wrong conditions.

Ok, if I understood well, you mean to add a script directly on the summoned actor. I thought it, but onload doesn't have parameters, so I can't kill it.
User avatar
Marie
 
Posts: 3405
Joined: Thu Jun 29, 2006 12:05 am

Post » Wed Jun 20, 2012 12:39 am

Ok man I did it, I post the code:
Scriptname MinorUndeadDeath extends ActorEvent OnLoad()Kill(self)endEvent
User avatar
Emilie Joseph
 
Posts: 3387
Joined: Thu Mar 15, 2007 6:28 am

Post » Tue Jun 19, 2012 3:00 pm

Cool I went to bed after my last post or I would have pointed out you could use self to reference the object the script was on.
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm


Return to V - Skyrim