truestiven Posted February 6, 2023 Share Posted February 6, 2023 Spell property akSource auto Event OnEffectStart(Actor akTarget, Actor akCaster) if (akSource.GetAssociatedSkill() == "Destruction") ;do stuffEndifEndEventSpell property akSource auto Gives error "GetAssociatedSkill is not a function or does not exist". I run CK in MO2, all scripts are unpacked in game folder and in the virtual folder, too How to fix it? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 6, 2023 Share Posted February 6, 2023 GetAssociatedSkill is a base game function on the MagicEffect script. Ensure that the scripts zip / rar file has been properly unpacked. The PSC files should be in the following locations: Defaults:32 bit Skyrim (all versions): scripts.rar file found in Data folder. PSC files go to "Data > Scripts > Source"64 bit Skyrim (all versions): scripts.zip file found in Data folder. PSC files go to "Data > Source > Scripts" Note:On 32 bit Skyrim it may be necessary to combine the base game and DLC source scripts into a single folder prior to including any mod added or mod modified scripts. This must be done in order of DLC release (i.e. Dawnguard, Heartfires, Dragonborn). To avoid this one may do all script compilation outside of the Creation Kit with third party text editors such as Notepad++ and Sublime Text as these editors have the ability to use multiple source file locations. All that said, your error is most likely due to trying to run GetAssociatedSkill with a spell rather than a magic effect. If you want the current effect to do something if it is associated with a particular skill, try the following instead: ScriptName SomeMagicEffectScript Extends MagicEffect Event OnEffectStart(Actor akTarget, Actor akCaster) If ( (Self as MagicEffect).GetAssociatedSkill() == "Destruction" ) ;do something EndIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts