TryToGetValue - ReferenceAlias
Revision as of 11:09, 3 December 2015 by imported>Plplecuyer
Member of: ReferenceAlias Script
This is a convenient way to get the actor value of an actor in an alias without calling GetActorReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call SetValue() on them without having to test for an actor being present first.
SyntaxEdit
float Function TryToGetValue(ActorValue akAV)
ParametersEdit
- akAV: the Actor value you want to get
Return ValueEdit
The value of the actor value. If there is no actor in the alias this will be 0. However since actor values can also be 0 this is not a valid way to determine if there was an actor in the alias.
ExamplesEdit
MyAlias.TryToGetValue(AggressionAV)
NotesEdit
Even though GetValue works on references, this function only works with actors, and so will fail and return 0 if the alias contains a reference, but not an actor.