AttachPlayerInput

From Spheriki

Jump to: navigation, search

Makes a person respond to input from any of the four configured player controls.


Contents

Usage

AttachPlayerInput(person_name, player_number);
  • person_name string. The name of the person to give control to.
  • player_number number, non-negative, from 0 to 3. The index of the player control set to use.


Examples

To give control of the person named "Fred" to the second player.

AttachPlayerInput("Fred", 1);

Note that player indices are zero-indexed.


Notes

  • AttachInput(person_name) is equivalent to AttachPlayerInput(person_name, 0).
  • The player_number parameter is zero-indexed, from 0 to 3, to cover the four player control sets. These controls can be configured using Sphere's config.exe utility or directly in the Sphere Editor, just choose menu option "Project" and then "Configure Sphere".
  • These controls are automatically handled in the map engine. They are ineffective outside of it.

See also

Personal tools