injaku Posted November 23, 2023 Share Posted November 23, 2023 Trying to create an activemagiceffect that will work with the total amount of gold value held by the target, but it doesn't appear to see, or will not caste, the Actor into a ObjectReference. https://ck.uesp.net/wiki/ObjectReference_Script "(Container only) Returns the number of forms in the container. (Actor ObjectReferences are containers)" Quote Scriptname XX_temp extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster) Int iFormIndex = akTarget.GetNumItems() Int total = 0 While iFormIndex > 0 iFormIndex -= 1 Form kForm = akTarget.GetNthForm(iFormIndex) total += kForm.GetGoldValue() * akTarget.GetItemCount(kForm) EndWhile Debug.MessageBox(total) endEvent XX_temp.psc(4,27 GetNumItems is not a function or does not exist XX_temp.psc(4,5 type mismatch while assigning to a int (cast missing or types unrelated) XX_temp.psc(8,24 GetNthForm is not a function or does not exist Link to comment Share on other sites More sharing options...
Pickysaurus Posted November 23, 2023 Share Posted November 23, 2023 Both of those function calls require SKSE. Make sure you have the PSC files from SKSE extracted. Link to comment Share on other sites More sharing options...
Recommended Posts