sexta-feira, 25 de março de 2016

BP Compendium: Get All Actors of Class

Get All Actors of Class


Get the references of all the actors who belong to the specified class or subclass.

Input

  • Actor Class: The class that will be used in the search.

Output

  • Out Actors: Array containing references to the actors of the specified class.


Example Usage

Imagine a Pac Man game with a "Pill" blueprint and a "Ghost" blueprint that has a Boolean variable "Scared". When the pill is caught, it has to inform all the ghosts to become scared.

Click to enlarge


In a second example, before creating a new enemy, the "Get All Actors of Class" function is used to see how many enemies are on the level. If there are less than the maximum number, then a new enemy is created.

Click to enlarge