<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=AddChild</id>
	<title>AddChild - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=AddChild"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=AddChild&amp;action=history"/>
	<updated>2026-05-13T00:01:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>http://www.wlabsocks.com/wiki/index.php?title=AddChild&amp;diff=724&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;== &lt;code&gt;AddChild&lt;/code&gt; Methods in Actor Class ==  === Overview === The &lt;code&gt;AddChild&lt;/code&gt; methods in the &lt;code&gt;Actor&lt;/code&gt; class are designed to add a child to the actor, either as a single parent or with a specified spouse. These methods are crucial in games where character relationships, lineage, and family dynamics are key elements of gameplay, narrative, or character development.  === Method 1: Add Child as Single Parent ===  ==== Syntax ==== &lt;syntaxhighlight l...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=AddChild&amp;diff=724&amp;oldid=prev"/>
		<updated>2023-12-23T10:55:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;lt;code&amp;gt;AddChild&amp;lt;/code&amp;gt; Methods in Actor Class ==  === Overview === The &amp;lt;code&amp;gt;AddChild&amp;lt;/code&amp;gt; methods in the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class are designed to add a child to the actor, either as a single parent or with a specified spouse. These methods are crucial in games where character relationships, lineage, and family dynamics are key elements of gameplay, narrative, or character development.  === Method 1: Add Child as Single Parent ===  ==== Syntax ==== &amp;lt;syntaxhighlight l...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== &amp;lt;code&amp;gt;AddChild&amp;lt;/code&amp;gt; Methods in Actor Class ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The &amp;lt;code&amp;gt;AddChild&amp;lt;/code&amp;gt; methods in the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class are designed to add a child to the actor, either as a single parent or with a specified spouse. These methods are crucial in games where character relationships, lineage, and family dynamics are key elements of gameplay, narrative, or character development.&lt;br /&gt;
&lt;br /&gt;
=== Method 1: Add Child as Single Parent ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public void AddChild(Actor child, bool joinFamily = true, bool setOrigin = true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;child&amp;lt;/code&amp;gt; (Actor): The Actor object representing the child to be added.&lt;br /&gt;
* &amp;lt;code&amp;gt;joinFamily&amp;lt;/code&amp;gt; (bool): Optional. If true, the child will automatically join the actor's family. Defaults to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;setOrigin&amp;lt;/code&amp;gt; (bool): Optional. If true, sets the child's origin family to the current actor's family. Defaults to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
This method allows an actor to add a child, optionally including the child in the actor's family and setting the child's origin family to be the same as the actor's.&lt;br /&gt;
&lt;br /&gt;
==== Usage Example ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public Actor parent;&lt;br /&gt;
public Actor child;&lt;br /&gt;
&lt;br /&gt;
// Parent adds a child with automatic family joining and setting origin family&lt;br /&gt;
parent.AddChild(child);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In this example, the parent actor adds a child. The child automatically joins the parent's family, and the parent's family is set as the child's origin family.&lt;br /&gt;
&lt;br /&gt;
=== Method 2: Add Child with Specified Spouse ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public void AddChild(Actor spouse, Actor child, bool joinFamily = true, bool setOrigin = true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;spouse&amp;lt;/code&amp;gt; (Actor): The Actor object representing the other parent of the child.&lt;br /&gt;
* &amp;lt;code&amp;gt;child&amp;lt;/code&amp;gt; (Actor): The Actor object representing the child to be added.&lt;br /&gt;
* &amp;lt;code&amp;gt;joinFamily&amp;lt;/code&amp;gt; (bool): Optional. If true, the child will automatically join the family. Defaults to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;setOrigin&amp;lt;/code&amp;gt; (bool): Optional. If true, sets the child's origin family to the current actor's family. Defaults to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
This method enables an actor, along with a specified spouse, to add a child. It includes options for the child to join the family and for setting the child's origin family.&lt;br /&gt;
&lt;br /&gt;
==== Usage Example ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public Actor mother;&lt;br /&gt;
public Actor father;&lt;br /&gt;
public Actor child;&lt;br /&gt;
&lt;br /&gt;
// Mother and father add a child with automatic family joining and setting origin family&lt;br /&gt;
mother.AddChild(father, child);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In this example, a mother and father jointly add a child. The child is automatically included in their family, and the family is established as the child's origin family.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
* These methods provide flexibility for representing complex family structures within the game, allowing for single parent or dual parent scenarios.&lt;br /&gt;
* The options to join the family and set the origin family are important for the accurate portrayal of family dynamics and lineage.&lt;br /&gt;
* The &amp;lt;code&amp;gt;AddChild&amp;lt;/code&amp;gt; methods are crucial in narrative-driven games, role-playing games, or any game where character relationships and family heritage significantly influence the story and gameplay.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>