<?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=Family.OnMemberJoin</id>
	<title>Family.OnMemberJoin - 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=Family.OnMemberJoin"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=Family.OnMemberJoin&amp;action=history"/>
	<updated>2026-05-12T23:27:52Z</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=Family.OnMemberJoin&amp;diff=952&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;== &lt;code&gt;onMemberJoin&lt;/code&gt; Event in Family Class ==  === Overview === The &lt;code&gt;onMemberJoin&lt;/code&gt; event in the Family class is triggered when a new member joins the family. This event is particularly relevant in games where family dynamics, lineage, and relationships play a significant role in the gameplay and narrative.  === Event Definition === &lt;syntaxhighlight lang=&quot;c#&quot;&gt; public Action&lt;Actor&gt; onMemberJoin; &lt;/syntaxhighlight&gt;  === Description ===  * Event Type: &lt;cod...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=Family.OnMemberJoin&amp;diff=952&amp;oldid=prev"/>
		<updated>2024-01-05T02:43:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;lt;code&amp;gt;onMemberJoin&amp;lt;/code&amp;gt; Event in Family Class ==  === Overview === The &amp;lt;code&amp;gt;onMemberJoin&amp;lt;/code&amp;gt; event in the Family class is triggered when a new member joins the family. This event is particularly relevant in games where family dynamics, lineage, and relationships play a significant role in the gameplay and narrative.  === Event Definition === &amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt; public Action&amp;lt;Actor&amp;gt; onMemberJoin; &amp;lt;/syntaxhighlight&amp;gt;  === Description ===  * Event Type: &amp;lt;cod...&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;onMemberJoin&amp;lt;/code&amp;gt; Event in Family Class ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The &amp;lt;code&amp;gt;onMemberJoin&amp;lt;/code&amp;gt; event in the Family class is triggered when a new member joins the family. This event is particularly relevant in games where family dynamics, lineage, and relationships play a significant role in the gameplay and narrative.&lt;br /&gt;
&lt;br /&gt;
=== Event Definition ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public Action&amp;lt;Actor&amp;gt; onMemberJoin;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
* Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Actor&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Functionality: Notifies when a new member joins the family, providing the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; object representing the new member.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The event can be used for updating family trees, modifying family-based quests, or triggering specific storylines or dialogues in response to the addition of a new family member.&lt;br /&gt;
&lt;br /&gt;
=== Example of Usage ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public class FamilyMemberAdditionListener : MonoBehaviour {&lt;br /&gt;
    void Start() {&lt;br /&gt;
        Family playerFamily = IM.Player.Family;&lt;br /&gt;
        if (playerFamily != null) {&lt;br /&gt;
            playerFamily.onMemberJoin += HandleNewFamilyMember;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private void HandleNewFamilyMember(Actor newMember) {&lt;br /&gt;
        Debug.Log($&amp;quot;A new member, {newMember.Name}, has joined the player's family.&amp;quot;);&lt;br /&gt;
        // Additional logic for handling the new family member&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    void OnDestroy() {&lt;br /&gt;
        if (IM.Player.Family != null) {&lt;br /&gt;
            IM.Player.Family.onMemberJoin -= HandleNewFamilyMember;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
* This example demonstrates how to subscribe to the &amp;lt;code&amp;gt;onMemberJoin&amp;lt;/code&amp;gt; event and handle it.&lt;br /&gt;
* When a new member joins the player's family, &amp;lt;code&amp;gt;HandleNewFamilyMember&amp;lt;/code&amp;gt; is called, logging the name of the new member and possibly triggering additional actions or updates.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
* It's important to unsubscribe from the event in the &amp;lt;code&amp;gt;OnDestroy&amp;lt;/code&amp;gt; method to prevent memory leaks or unintended behavior.&lt;br /&gt;
* The &amp;lt;code&amp;gt;onMemberJoin&amp;lt;/code&amp;gt; event helps in maintaining an up-to-date and dynamic representation of the player's family, adapting to changes in family composition.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>