Jump to content

Form Failed to Cast as an Actor?


Recommended Posts

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

  • Recently Browsing   0 members

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