<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Scirra Forum : Can I copy objects? Or how to do multiplayer</title>
  <link>http://www.scirra.com/forum/</link>
  <description>This is an XML content feed of; Scirra Forum : How do I....? : Can I copy objects? Or how to do multiplayer</description>
  <copyright>Copyright (c) 2006-2011 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 23 May 2013 03:46:32 +0000</pubDate>
  <lastBuildDate>Fri, 20 Jul 2012 01:04:02 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 10.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.scirra.com/forum/RSS_post_feed.asp?TID=54591</WebWizForums:feedURL>
  <image>
   <title>Scirra Forum</title>
   <url>http://www.scirra.com/forum/forum_images/web_wiz_forums.png</url>
   <link>http://www.scirra.com/forum/</link>
  </image>
  <item>
   <title>Can I copy objects? Or how to do multiplayer : Ah thanks ramones that looks to...</title>
   <link>http://www.scirra.com/forum/can-i-copy-objects-or-how-to-do-multiplayer_topic54591_post341280.html#341280</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/dru">Dru</a><br /><strong>Subject:</strong> 54591<br /><strong>Posted:</strong> 20 Jul 2012 at 1:04am<br /><br />Ah thanks ramones that looks to work fine.]]>
   </description>
   <pubDate>Fri, 20 Jul 2012 01:04:02 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/can-i-copy-objects-or-how-to-do-multiplayer_topic54591.html</guid>
  </item> 
  <item>
   <title>Can I copy objects? Or how to do multiplayer : Give the Player object an instance...</title>
   <link>http://www.scirra.com/forum/can-i-copy-objects-or-how-to-do-multiplayer_topic54591_post341056.html#341056</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/ramones">ramones</a><br /><strong>Subject:</strong> 54591<br /><strong>Posted:</strong> 19 Jul 2012 at 12:33am<br /><br />Give the Player object an instance var called 'playerNumber' and set it to 1, 2, 3, 4 on each of your players. Have a global var called 'currentPlayer'. And then you simply do:<br /><br />Player: playerNumber = currentPlayer<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Player: Add 1 to score]]>
   </description>
   <pubDate>Thu, 19 Jul 2012 00:33:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/can-i-copy-objects-or-how-to-do-multiplayer_topic54591.html</guid>
  </item> 
  <item>
   <title>Can I copy objects? Or how to do multiplayer : I&#8217;ve got  a question about copying...</title>
   <link>http://www.scirra.com/forum/can-i-copy-objects-or-how-to-do-multiplayer_topic54591_post341046.html#341046</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/dru">Dru</a><br /><strong>Subject:</strong> 54591<br /><strong>Posted:</strong> 19 Jul 2012 at 12:02am<br /><br />I’ve got  a question about copying objects as if they were variables.<br /><br />I’m making a turn based card game with 4 players (hotseat game). Each player is represented as an Object with a number of attributes (CardsInHand, Score etc.). <br /><br />When Events happen in the game I need to update one of the players attributes depending on whose turn it is.  So something like this<br /><br />Player1<br />Player2<br />Player3<br />Player4<br /><br />&lt;turn 1&gt;<br />CurrentPlayer = Player1<br /><br />&lt;then play the turn&gt;<br />Add 1 to CurrentPlayer score<br />Add a card to the CurrentPlayer hand<br />Etc.<br /><br />&lt;turn 2&gt;<br />CurrentPlayer = Player2<br /><br /><br />What’s the best way to accomplish this while keeping the code as simple as possible?<br />]]>
   </description>
   <pubDate>Thu, 19 Jul 2012 00:02:31 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/can-i-copy-objects-or-how-to-do-multiplayer_topic54591.html</guid>
  </item> 
 </channel>
</rss>