Does this exist? It seems to be a http://www.creationkit.com/IsActor, but not a Papyrus one. I know I could use Magic Effects to test this, most likely, but I'd rather not.
This is my script:
Scriptname testbanditscript extends objectreferenceMessage Property SummonConfirmation Auto {0 is cancel, 1 is confirm}GlobalVariable Property SummonFollowerKey Auto {To choose a follower to summon}GlobalVariable Property AllowAnyNPC Auto{Disabled by default. If true, allow to choose any NPC for summon. For custom follower framework followers.}Faction Property CurrentFollowerFaction Auto {CurrentFollowerFaction}ReferenceAlias Property FollowerToSummon Auto{Empty property to reference the follower to summon}Event OnKeyDown(int keyCode) If KeyCode == SummonFollowerKey.GetValueInt() If AllowAnyNPC.GetValueInt() == 0 && (Game.GetCurrentCrosshairRef() as Actor).IsInFaction(CurrentFollowerFaction) Int Button = SummonConfirmation.Show() While SummonConfirmation If Button == 1 ;confirm FollowerToSummon.Clear() FollowerToSummon.ForceRefTo(Game.GetCurrentCrosshairRef() as Actor) EndIf EndWhile ElseIf AllowAnyNPC.GetValueInt() == 1; this is what we're looking at EndIfEndEvent
You can ignore most everything, and the fact that it clearly wouldn't compile, but the ElseIf is what I want to focus on. Is there a way to check that Game.GetCurrentCrosshairRef IS indeed an actor without using the IsInFaction command, or any other thing that could limit the functionality of the second If? Essentially, I want the second If to do this:
ElseIf AllowAnyNPC.GetValueInt() == 1 && (Game.GetCurrentCrosshairRef() as Actor).IsActor == 1
EDIT: Wow, it's one of those things where I THINK I figure it out right after. Would this work?
ElseIf AllowAnyNPC.GetValueInt() == 1 && (Game.GetCurrentCrosshairRef() as Actor).GetActorBase().Getsix == 1 || (Game.GetCurrentCrosshairRef() as Actor).GetActorBase().Getsix == 0 || (Game.GetCurrentCrosshairRef() as Actor).GetActorBase().Getsix == -1