Data Table Get Random Record
Copy a random row from a DataTable into a DataRecord.
Parameters
| Parameter | Description |
|---|---|
| Data Table Source | Select the source DataTable. Set Source, then assign the matching table, asset, or component field that appears. |
| Data Definition | Optional definition if the resolved table is variable-based or not available in the editor. |
| Weight Field | Choose a numeric field to weight random selection (optional). |
| Record | Output selected row copy. |
| Index | Output selected row index. |
| Key | Output selected row key. |
| Found | True if a row was selected. |
Details
- If
Weight Fieldis empty, selection is uniform. - If a weight field is provided, selection is based on weighted values.
- Outputs
Foundas false when table is empty or no row could be selected.
Examples
- Pick a random enemy spawn config row.
- Choose a loot item with weighted drop chances.