F4llfield Posted May 14 Share Posted May 14 (edited) Hi, I created a Formlist of NPCs and I need to iterated in loop and extract an actor from that list, how can I do that ? I know how to do the loop for each formlist entry, but how can I convert a form to an actor is my question. Since there is no ActorList function. Edited May 14 by F4llfield Link to comment Share on other sites More sharing options...
LarannKiar Posted May 14 Share Posted May 14 You mean something like this? Scriptname testScript FormList Property ActorList Auto Const Function LoopActorsInList() Int ListSize = ActorList.GetSize() Int Index = ListSize - 1 While Index >= 0 Actor LoopActor = ActorList.GetAt(Index) as Actor ; cast the Form as Actor If LoopActor ; found actor in list EndIf Index = Index - 1 EndWhile EndFunction Link to comment Share on other sites More sharing options...
F4llfield Posted May 15 Author Share Posted May 15 Yes! Thousands thanks. It worked! Link to comment Share on other sites More sharing options...
Recommended Posts