The setDynEnergy native AI script function is used to set energy values on a specified index for all groups that match a given request. Valid index values for this action are integers between 0 and 3. Valid values for the energy parameter range from 0 to 1.
The request parameter for this action takes the form of [family-<family_name>] [cellZone-<cellzone_name>]
. It is possible to use wildcards (? and *) in the family and cellzone names.
()setDynEnergy(Request: s, Index: f, Value: f) // setDynEnergy_sff_
[family-<family_name>] [cellZone-<cellzone_name>]
.()setDynEnergy("family-tribu*", Index, Energy)
This example code sets the dynamic energy of all groups defined by the family-tribu* request string to the energy value specified by Energy
in the energy slot specified by Index
.