ActiveMagicEffect88 Posted October 23, 2018 Share Posted October 23, 2018 So I had a script that goes like this Function Detection() int FollowerCount = FLST_FollowerList.GetSize() Debug.Trace("[Scriptname] Follower list is currently " + FollowerCount) Form fFollower = FLST_FollowerList.GetAt(0) Debug.Trace("[Scriptname] " + fFollower + "is in form mode.") If fFollower != None Debug.Trace("[Scriptname]Follower exist as Form!") Else Debug.Trace("[Scriptname]Follower does not exist as Form!") EndIf ObjectReference oFollower = FLST_FollowerList.GetAt(0) as ObjectReference If oFollower != None Debug.Trace("[Scriptname]Follower exist as Obj!") Else Debug.Trace("[Scriptname]Follower does not exist as Obj!") EndIf Actor aFollower = FLST_FollowerList.GetAt(0) as Actor If aFollower != None Debug.Trace("[Scriptname]Follower exist as Act!") Else Debug.Trace("[Scriptname]Follower does not exist as Act!") EndIf EndFunction Theoretically this should works. But when I test it, the papyrus log had it like this [MM/DD/YYYY - HH:MM:SS] [Scriptname]Follower list is currently 1 [MM/DD/YYYY - HH:MM:SS] [Scriptname] [Form < (xx000D61)>]is in form mode. [MM/DD/YYYY - HH:MM:SS] [Scriptname]Follower exist as Form! [MM/DD/YYYY - HH:MM:SS] [Scriptname]Follower does not exist as Obj! [MM/DD/YYYY - HH:MM:SS] [Scriptname]Follower does not exist as Act! Does casting Form as Actor or ObjectReference not working anymore? Or am I missing something important here? The assigned form is an NPC inside the Form List. Link to comment Share on other sites More sharing options...
Deleted3897072User Posted October 23, 2018 Share Posted October 23, 2018 Formlists contain base objects, not object references. So in this case it contains an ActorBase, not an Actor. You can't cast it as an Actor or an ObjectReference because it isn't one. Link to comment Share on other sites More sharing options...
ActiveMagicEffect88 Posted October 24, 2018 Author Share Posted October 24, 2018 Aaah, I see. Thanks very much. I learn something new everyday. Link to comment Share on other sites More sharing options...
Evangela Posted October 29, 2018 Share Posted October 29, 2018 (edited) But you can instead check if the follower's actorbase matches the form. (Follower as Actor).GetActorBase() == actorbase form to check.. Edited October 29, 2018 by Rasikko Link to comment Share on other sites More sharing options...
Recommended Posts