<?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=OnPlayerDivorced</id>
	<title>OnPlayerDivorced - 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=OnPlayerDivorced"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnPlayerDivorced&amp;action=history"/>
	<updated>2026-05-12T22:57:53Z</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=OnPlayerDivorced&amp;diff=791&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;== &lt;code&gt;onPlayerDivorced&lt;/code&gt; Event in Actor Class ==  === Overview === The &lt;code&gt;onPlayerDivorced&lt;/code&gt; event in the &lt;code&gt;Actor&lt;/code&gt; class is triggered when the player-character gets divorced. This event holds significant importance in games where marital status influences character dynamics, gameplay mechanics, or narrative progression.  === Description ===  * Event Type: &lt;code&gt;Action&lt;Actor, Actor&gt;&lt;/code&gt; * Functionality: Activated when a divorce occurs between...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnPlayerDivorced&amp;diff=791&amp;oldid=prev"/>
		<updated>2023-12-24T20:50:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;lt;code&amp;gt;onPlayerDivorced&amp;lt;/code&amp;gt; Event in Actor Class ==  === Overview === The &amp;lt;code&amp;gt;onPlayerDivorced&amp;lt;/code&amp;gt; event in the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is triggered when the player-character gets divorced. This event holds significant importance in games where marital status influences character dynamics, gameplay mechanics, or narrative progression.  === Description ===  * Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Actor, Actor&amp;gt;&amp;lt;/code&amp;gt; * Functionality: Activated when a divorce occurs between...&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;onPlayerDivorced&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;onPlayerDivorced&amp;lt;/code&amp;gt; event in the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is triggered when the player-character gets divorced. This event holds significant importance in games where marital status influences character dynamics, gameplay mechanics, or narrative progression.&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: Activated when a divorce occurs between the player-character and their spouse. The event handler receives two &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; parameters representing the divorced couple. This setup allows for the implementation of specific reactions or updates in response to the divorce event.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The event is utilized to trigger updates or custom actions within the game when the player-character's marital status changes due to divorce. This could include modifying character interactions, updating narrative elements, or adjusting gameplay options to reflect the new circumstances.&lt;br /&gt;
&lt;br /&gt;
=== Subscribing to the Event ===&lt;br /&gt;
To effectively handle the &amp;lt;code&amp;gt;onPlayerDivorced&amp;lt;/code&amp;gt; event, a method with the signature &amp;lt;code&amp;gt;Action&amp;lt;Actor, Actor&amp;gt;&amp;lt;/code&amp;gt; should be subscribed to it within a MonoBehaviour script. Unsubscribing from the event is important to avoid memory leaks and ensure appropriate game 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 DivorceEventHandler : 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.onPlayerDivorced += OnPlayerDivorced;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private void OnPlayerDivorced(Actor exSpouse1, Actor exSpouse2) {&lt;br /&gt;
        Debug.Log($&amp;quot;{exSpouse1.FullName} and {exSpouse2.FullName} have been divorced.&amp;quot;);&lt;br /&gt;
        // Logic to respond to the divorce 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.onPlayerDivorced -= OnPlayerDivorced;&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;DivorceEventHandler&amp;lt;/code&amp;gt; is attached to a GameObject and listens for the &amp;lt;code&amp;gt;onPlayerDivorced&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 divorced, the &amp;lt;code&amp;gt;OnPlayerDivorced&amp;lt;/code&amp;gt; method is invoked, providing an opportunity to handle the divorce, 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;onPlayerDivorced&amp;lt;/code&amp;gt; event adds complexity to the game by reflecting significant changes in the player-character's personal life and its impact on their journey.&lt;br /&gt;
* Proper handling of this event can enrich the narrative and gameplay experience, offering a nuanced portrayal of character relationships.&lt;br /&gt;
* This event is especially relevant in role-playing games, simulation games, and other genres where personal relationships and character development are integral to the gameplay.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>