-
Notifications
You must be signed in to change notification settings - Fork 94
rndm
Ryzom Core Wiki edited this page Jul 8, 2024
·
3 revisions
title: Random description: published: true date: 2023-03-16T23:09:44.874Z tags: editor: markdown dateCreated: 2023-03-16T22:27:05.826Z
The rndm native AI script function is used to generate a random float value in the specified range [min; max). The max value is exclusive, meaning it is not included in the possible generated values.
(random_value: f)rndm(min: f, max: f) // rndm_ff_f
- min (float): The lower bound of the possible returned values.
- max (float): The upper bound of the possible returned values.
- random_value (float): A random value between min and max.
(val)rndm(0, 1);
This example code generates a random float value between 0 (inclusive) and 1 (exclusive), and returns the value as a float.
Note that the max value is not included in the range of possible generated values. In the example above, the function could return any value in the range [0;1[.