<?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=OnPlayerIsMarried</id>
	<title>OnPlayerIsMarried - 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=OnPlayerIsMarried"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnPlayerIsMarried&amp;action=history"/>
	<updated>2026-04-17T07:26:20Z</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=OnPlayerIsMarried&amp;diff=790&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;== &lt;code&gt;onPlayerIsMarried&lt;/code&gt; Event in Actor Class ==  === Overview === The &lt;code&gt;onPlayerIsMarried&lt;/code&gt; event within the &lt;code&gt;Actor&lt;/code&gt; class is triggered when the player-character gets married. This event is significant in games where marriage between characters impacts narrative progression, character development, or gameplay mechanics.  === Description ===  * Event Type: &lt;code&gt;Action&lt;Actor, Actor&gt;&lt;/code&gt; * Functionality: This event is activated upon the mar...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnPlayerIsMarried&amp;diff=790&amp;oldid=prev"/>
		<updated>2023-12-24T20:47:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;lt;code&amp;gt;onPlayerIsMarried&amp;lt;/code&amp;gt; Event in Actor Class ==  === Overview === The &amp;lt;code&amp;gt;onPlayerIsMarried&amp;lt;/code&amp;gt; event within the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is triggered when the player-character gets married. This event is significant in games where marriage between characters impacts narrative progression, character development, or gameplay mechanics.  === Description ===  * Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Actor, Actor&amp;gt;&amp;lt;/code&amp;gt; * Functionality: This event is activated upon the mar...&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;onPlayerIsMarried&amp;lt;/code&amp;gt; Event in Actor Class ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The &amp;lt;code&amp;gt;onPlayerIsMarried&amp;lt;/code&amp;gt; event within the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is triggered when the player-character gets married. This event is significant in games where marriage between characters impacts narrative progression, character development, or gameplay mechanics.&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
* Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Actor, Actor&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Functionality: This event is activated upon the marriage of the player-character to another actor. It receives two &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; parameters representing the couple who are getting married. This allows the game to execute specific actions or logic in response to this significant character event.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The event can be used to trigger updates or custom actions within the game when the player-character marries, such as updating character status, unlocking new gameplay features, or advancing storylines based on the new marital relationship.&lt;br /&gt;
&lt;br /&gt;
=== Subscribing to the Event ===&lt;br /&gt;
To effectively respond to the &amp;lt;code&amp;gt;onPlayerIsMarried&amp;lt;/code&amp;gt; event, subscribe a method with the signature &amp;lt;code&amp;gt;Action&amp;lt;Actor, Actor&amp;gt;&amp;lt;/code&amp;gt; within a MonoBehaviour script. It's important to unsubscribe from the event to maintain optimal game performance and prevent unintended behavior.&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 MarriageEventHandler : MonoBehaviour {&lt;br /&gt;
    public Actor playerCharacter;&lt;br /&gt;
&lt;br /&gt;
    void Start() {&lt;br /&gt;
        if (playerCharacter != null) {&lt;br /&gt;
            playerCharacter.onPlayerIsMarried += OnPlayerMarried;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private void OnPlayerMarried(Actor spouse1, Actor spouse2) {&lt;br /&gt;
        Debug.Log($&amp;quot;{spouse1.FullName} and {spouse2.FullName} are now married.&amp;quot;);&lt;br /&gt;
        // Logic to handle the marriage event of the player-character&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    void OnDestroy() {&lt;br /&gt;
        if (playerCharacter != null) {&lt;br /&gt;
            playerCharacter.onPlayerIsMarried -= OnPlayerMarried;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In this Unity script, &amp;lt;code&amp;gt;MarriageEventHandler&amp;lt;/code&amp;gt; is attached to a GameObject and subscribes to the &amp;lt;code&amp;gt;onPlayerIsMarried&amp;lt;/code&amp;gt; event of a player-character &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt;. When the player-character gets married, the &amp;lt;code&amp;gt;OnPlayerMarried&amp;lt;/code&amp;gt; method is called, providing an opportunity to react to the marriage, such as updating the characters' statuses or triggering related narrative events.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;onPlayerIsMarried&amp;lt;/code&amp;gt; event adds a layer of depth to gameplay, reflecting significant life events and their impact on the player-character's journey.&lt;br /&gt;
* Properly managing this event can contribute to a richer narrative experience, offering a more immersive and responsive environment.&lt;br /&gt;
* This event is especially relevant in role-playing games, simulation games, and other genres where character relationships and life events play a central role in the game's progression.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>