This site has been archived and made available for preservation purposes. No edits can be made.

OnActorValueChange

This is an old revision of this page, as edited 09-28-2011, 07:30 PM by . It may differ significantly from the current revision.
Gets called when an [[Actor]]'s value has changed.

== Declaration ==
<code cpp>
VAULTSCRIPT void OnActorValueChange(vaultmp::ID, vaultmp::Index, vaultmp::Value);
forward OnActorValueChange(ID, index, Float:value);
</code>
== Parameters ==

'''[[ID|vaultmp::ID]]''' - the ID of the [[Actor]]

'''[[Index|vaultmp::Index]]''' - the index of the [[Value]]

'''[[Value|vaultmp::Value]]''' - the new value

== Return value ==

None.

== Usage example (C++) ==

<code cpp>
void VAULTSCRIPT OnActorValueChange(ID actor, Index index, Value value)
{
std::string value_name;
value_name = ValueToString(index);
// value_name now contains the string representation of the value
}
</code>