<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>GetController</title>
    <category>Objects</category>
    <subcat>Crew</subcat>
    <version>5.1 OC</version>
    <syntax><rtype>int</rtype></syntax>
    <desc>Determines which player is currently controlling an object or has last controlled it. With crew members this is usually the owning player. With vehicles it is the owner of the clonk that has last grabbed or pushed it. Objects that are collected by living things automatically change their owner to the owner of the new container. If an object changes its owner (see <funclink>SetOwner</funclink>()), the controller is automatically set to the new owner.</desc>
    <remark>The controller value is not affected by temporary control e.g. through <funclink>SetCursor</funclink>.</remark>
    <examples>
      <example>
        <code><funclink>DoScore</funclink>(GetController(), 100);</code>
        <text>Gives 100 score to the player controlling the calling object.</text>
      </example>
    </examples>
    <related>
      <funclink>SetController</funclink>
      <funclink>GetCursor</funclink>
      <funclink>GetOwner</funclink>
    </related>
  </func>
  <author>Sven2</author><date>2002-05</date>
</funcs>
