Skip to content

copy_dyn_energy

Ryzom Core Wiki edited this page Jul 8, 2024 · 5 revisions

title: Copy Dyn Energy description: published: true date: 2023-03-16T23:05:37.045Z tags: editor: markdown dateCreated: 2023-03-16T22:21:47.316Z

copyDynEnergy

The copyDynEnergy native AI script function is used to copy energy values from one index to another on all groups that match a specified request. Valid index values for this action are integers between 0 and 3.

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.

Syntax

()copyDynEnergy(Request: s, IndexSrc: f, IndexDst: f) // copyDynEnergy_sff_

Arguments

  • Request (string): A request string in the format [family-<family_name>] [cellZone-<cellzone_name>].
  • IndexSrc (float): The index number of the source energy slot.
  • IndexDst (float): The index number of the destination energy slot.

Example

()copyDynEnergy("family-tribu*", SourceIndex , DestinationIndex) 

This example code copies the dynamic energy of all groups defined by the family-tribu* request string from the energy slot specified by IndexSrc to the energy slot specified by IndexDst.

Clone this wiki locally