random_select_state - ryzom/ryzomcore GitHub Wiki


title: Random Select State description: published: true date: 2023-03-12T01:25:38.662Z tags: editor: markdown dateCreated: 2023-03-11T21:06:43.694Z

random_select_state

The random_select_state action changes the state of the NPC group to one of the listed states at random.

Weight assigned to each state determine the probability of that state being selected. The higher the weighting value, the more likely it is that the state will be chosen.

Parameter Syntax

<weighing value> <state name>
[...]

Parameters

  • <weighting value>: The weighting value assigned to the state. This value determines the likelihood of the state being selected.
  • <state name>: The name of the state to select.
  • [...]: Any number of <weighing value> <state name> may follow

See also

  • Begin State: An action that switches to another state, which can be used in conjunction with random_select_state to randomly switch between multiple states.
  • Punctual State: An action that suspends the current active state and begins a punctual state, which has no positional behavior.
  • Punctual State End: An action that deactivates the current punctual state and returns to the previously suspended positional state.
  • Random Select: An action that executes one of its child actions at random, which can be used in conjunction with random_select_state to randomly switch between multiple states.
⚠️ **GitHub.com Fallback** ⚠️