multi_switcher

XashXT

multi_switcher

A target switcher that can shuffle targets randomly.

Spawnflag

SF_SWITCHER_START_ON 1 (the switcher is turned on and changing targets as specified by the mode option)

Options

mode How targets are changed:
  • 0—next
  • 1—previous
  • 2—shuffle
delay Interval between target changes in automatic mode.

Usage Details

  • Regular activations must pass unchanged to the target through the switcher. The switcher itself responds only to the < and > prefixes, which can be used for controlling its behaviour in-game.
  • The < prefix without a value turns on an inactive switcher that has the SF_SWITCHER_START_ON spawnflag set. If the SF_SWITCHER_START_ON spawnflag is not set, then each subsequent activation with the < prefix but without a value will initiate the target change in the order specified in the mode field. That is, in mode 0 a single activation with the < prefix causes a switch to the next target (without activating it); in mode 1 it causes a switch to the previous target (without activating it); in mode 2 the target will be chosen randomly (without being activated). Activation with the < prefix and a value causes a switch to the target whose number the value indicates.
  • Activation with the > prefix resets the current target to the first one and disables automatic target change mode for a switcher with the SF_SWITCHER_START_ON spawnflag set. To enable automatic switching again, activate the switcher with the < prefix without a value, as mentioned above.
  • All other kinds of activation are passed on unchanged directly to the target.