Jump to content

[LE] Run a script from a perk on a NPC


mrclint

Recommended Posts

So, I've tried to make a mod which uses 'Spell Perk Item Distribution' to assign perks to NPC:s in the purpose of assigning them outfits (essentially I want to make a mod that uses other armor mods to clothe up my Skyrim).

The perk gets assigned perfectly to everyone, but they don't fire of the script I've put on the perk:

 

Scriptname UOFUC_newscript extends Perk
Actor Property MyActor Auto
Outfit Property NewOutfit Auto

{Link Ref the Actor}

Event OnStart( )
;akActor.SetOutfit(NewOutfit)
Debug.Notification("MyMod Initializing")
EndEvent

 

Right now I am only trying to make the debug message appear.

 

I have a feeling from reading about perk scripts that this isn't possible. Am i right?

 

Link to comment
Share on other sites

Perks cannot be added dynamically to npcs, it's not supported by the game, you can add perks dynamically ONLY to the player.

* Your perks are never added to the npcs in-game....


You need to change direction and use for example 'Ability Spells', but Ab Spells have their own issues.

Link to comment
Share on other sites

 

Perks cannot be added dynamically to npcs, it's not supported by the game, you can add perks dynamically ONLY to the player.
* Your perks are never added to the npcs in-game....
You need to change direction and use for example 'Ability Spells', but Ab Spells have their own issues.

 

Maybe not dynamically, but all the NPCs gets the perk.

 

[12:53:00:869] [info] Perks

[12:53:00:869] [info] UOFUC_killher [0x28000D62] added to 27102/27103 NPCs

Link to comment
Share on other sites

Just keep in mind that Ab Spells added in-game will start to malfunction after some period, this is one more issue that the game engine has from day one.


In order to avoid this issue, the Ab Spell must be Removed and Added to the npcs every now and then, otherwise after some time your 'Outfit Equip' mod will stop working.


Have a happy modding.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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