TryToSetValue - ReferenceAlias

Revision as of 12:11, 3 December 2015 by imported>Plplecuyer
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: ReferenceAlias Script

This is a convenient way to set 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

bool Function TryToSetValue(ActorValue akAV, float afValue)

ParametersEdit

  • akAV: the Actor Value name you want to set
  • afValue: the value you want to set

Return ValueEdit

True if the alias contained an actor, false if the alias didn't contain an actor.

ExamplesEdit

MyAlias.TryToSetActorValue(AggressionAV, 0)

NotesEdit

Even though SetValue works on references, this function only works with actors, and so will fail and return false if the alias contains a reference, but not an actor.

See AlsoEdit