domingo, 27 de março de 2016

BP Compendium: Is Valid

Is Valid


Macro that verifies the validity of the input object. For an object to be valid it can not be null or be marked to be destroyed.

Input

  • Input Object: A reference to an object.

Output

  • Is Valid: Execution pin that is used if the referenced object is valid.
  • Is Not Valid: Execution pin that is used if the referenced object is invalid.


Example Usage

On a blueprint called "Machine" an editable variable was created that will be used to reference another blueprint called "Recharger". By adding a blueprint "Machine" at the level we can see that the contents of the variable "Recharger" is "None" as below:



This means that the variable "Recharger" is not referencing any object, so it is not valid. This variable should receive a reference to an object "Recharge" that is on the level. You can see when the game starts if the variable "Recharger" received this reference, if it has not received then it will be written a message in the log, as the image below.

Click to enlarge

In another example, imagine that the Blueprint "Machine" is responsible for protecting a Blueprint "Recharger" that is on the level. If the Blueprint recharger that it was protecting is destroyed, it needs to find another "Recharger" to protect:

Click to enlarge