Jump to content

[LE] Is there an Event that plays when an NPC is summoned?


saintgrimm92

Recommended Posts

I was double checking my spells list and realized there is one that I wanted to make but didn't for some reason (possibly didn't wanna ask how to do this at the time lol) but I'm trying to get it implemented into my mod now.

The spell is a "mass summon" spell that summons 6 skeletons for 1 minute. The spell itself will "require" twin souls perk, otherwise I'm pretty sure one of the 2 skeletons summoned will just die. To bypass the limit of 2, the spell will summon 2 skeletons with a unique twin souls perk, which in turn summons 2 skeletons each.

With other summons I got help here on the forums making an NPC summon more NPCs when it enters combat. This time I don't want a combat event though. I want the 2 player-controlled skeletons to summon 2 more skeletons each the moment they appear to give the illusion that all 6 were summoned together by the player.

 

I went through the "Events" page on ck wiki but nothing caught my eye as an event that would be called on when the NPC is summoned. I was hoping to find something like "OnSummon" or "OnSpawn" or something, but can't seem to find anything similar.

Link to comment
Share on other sites

OnLoad maybe?

 

Worth a shot, will edit this in a few mins with update lol Thanks for reply :smile:

 

EDIT: Sadly, no luck with that one.

 

EDIT2: OnLoad made me think of OnInit, but that don't work either lol

 

EDIT3: Tried the perk route. Main spell applies a duplicate of twin souls with no conditions, setting the commanded actor limit to 6 instead of 2. Seems to conflict with normal twin souls or something idk, changes to only summoning 1/6 script told it to.

 

 

Edit4: It's not as cool, but I've spent all day trying to figure this out, so I'm done with it. The player spell will just summon 2 necromancer skeletons, and those 2 skeletons will summon 2 more when entering combat. Summoning 2 summoners isn't as cool as summoning a horde, but w/e lol

Edited by saintgrimm92
Link to comment
Share on other sites

 

OnCellAttach() - OnLoad() - OnSpellCast() - OnActivate() - OnEffectStart() - OnMagicEffectApply()
All of the above work just fine, the only issue is how and where they will be implemented.

 

 

OnEffectStart. And if the summon mgef effect gets dispelled, the minion despawns too

 

I never considered oneffectstart.

 

I tried using that and scripting the entire thing from the actual magic effect, but it didn't work. I never tried an oneffectstart event on the actor though. I'm actually doing testing on a clean install right now to make sure I copied all the needed files, then it'll be uploaded, so it won't make it into this one, but I'll def keep this post bookmarked for future use, thank both of you for all the help you've given! :)

 

 

Link to comment
Share on other sites

You can do this without creating any new scripts, as I have done in my "More Dangerous Enemies" Mod. You could just modify the "Twin Souls" Perk to up the number from 2 to 6, but if you are not wanting to mess with "Vanilla" stuff as much as possible...

 

If the New Perk that allows more "Minions" is put onto a created NPC, or the Player, that does not have the "Twin Souls" Perk, then they can "Summon" up to the limit of the Perk without problem. However, if it is the Player, as in your case, and the Player does have the "Twin Souls" Perk, then the two Perks do clash. The way to fix this is to modify the Vanilla Twin Souls Perk to not fire if the newly-created Perk that allows more Minions is "owned". The Condition to do this should be put on the "Perk Entry" page of the Twin Souls Perk, on the "Perk Owner" Tab. The Function is "HasPerk".

 

What I was trying to do in "More Dangerous Enemies", was to be able to have up to 5 Reanimated Minions fighting for me at the same time.

 

Anyway, good luck!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...