trigger_random_unique

Modified

12-Jul-2023

Obsolete, use trigger_random with "Unique" flag. Trigger which will pick one of its targets, which has not been triggered by it before, randomly and fire it when triggered.

Keyvalues


OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.

Name targetname : Set name of trigger_random_unique so other entities can trigger it to pick random target.

Target Count target_count : Amount of random targets you have specified below. E.g. if you used "Target 1'" "Target 2" and "Target 3" then set it to 3.

Target 1 target1 : Target no. 1 that can be triggered when picking random target.

Target 2 target2 : Target no. 2 that can be triggered when picking random target.

Target 3 target3 : Target no. 3 that can be triggered when picking random target.

Target 4 target4 : Target no. 4 that can be triggered when picking random target.

Target 5 target5 : Target no. 5 that can be triggered when picking random target.

Target 6 target6 : Target no. 6 that can be triggered when picking random target.

Target 7 target7 : Target no. 7 that can be triggered when picking random target.

Target 8 target8 : Target no. 8 that can be triggered when picking random target.

Target 9 target9 : Target no. 9 that can be triggered when picking random target.

Target 10 target10 : Target no. 10 that can be triggered when picking random target.

Target 11 target11 : Target no. 11 that can be triggered when picking random target.

Target 12 target12 : Target no. 12 that can be triggered when picking random target.

Target 13 target13 : Target no. 13 that can be triggered when picking random target.

Target 14 target14 : Target no. 14 that can be triggered when picking random target.

Target 15 target15 : Target no. 15 that can be triggered when picking random target.

Target 16 target16 : Target no. 16 that can be triggered when picking random target.

Flags


  • 1 : Re-usable : If set, the trigger_random_unique can be used again after having fired its targets, handling all of them as if not triggered before again.