NextActor
Usage:
NextActor([ActorHandle])
Description:
The NextActor command returns a handle to the next actor in the list of all in-game actors. If the ActorHandle parameter is left out, NextActor will return the first actor in the list. This command allows you to easily cycle through and do something to every actor in the game.
Example:
Function Main()
// Send a message to every human actor in the game
Actor = NextActor()
If (Actor != 0)
.Loop
If (ActorIsHuman(Actor))
Output(Actor, "Hello there!")
EndIf
Actor = NextActor(Actor)
If (Actor != 0)
Goto(Loop)
EndIf
EndIf
Return()
End Function
Comments (0)
You don't have permission to comment on this page.