JoinFamily
JoinFamily
Methods in Actor Class
Overview
The JoinFamily
methods in the Actor
class are designed to enable an actor to join a specified family. There are two overloads of this method: one that takes a Family
object and another that takes a family name or ID as a string. These methods are crucial in games where family affiliations and dynamics play a significant role in character development, narrative progression, or gameplay mechanics.
Method 1: Join Family by Object
Syntax
public void JoinFamily(Family family, bool setOrigin = false)
Parameters
family
(Family): TheFamily
object that the actor will join.setOrigin
(bool): Optional. If true, sets the specified family as the actor's origin family. Defaults tofalse
.
Description
This method allows the actor to join a family represented by a Family
object. Optionally, it can also set this family as the actor's origin family, which could be important for defining the actor's backstory and relationships.
Usage
Used when the family to be joined is represented by a Family
object, providing a direct and specific way for actors to affiliate with a family within the game.
Method 2: Join Family by Name or ID
Syntax
public void JoinFamily(string familyNameOrId, bool setOrigin = false)
Parameters
familyNameOrId
(string): The name or ID of the family to join.setOrigin
(bool): Optional. If true, sets the family (identified by name or ID) as the actor's origin family. Defaults tofalse
.
Description
This method enables the actor to join a family based on the family's name or ID. It offers the flexibility to associate an actor with a family when the family object is not directly accessible, using just the family's name or ID.
Usage
Utilized when the specific Family
object is not available, and the family is instead identified by a name or ID. This method is particularly useful in scenarios where families need to be referenced or modified dynamically based on game events or player choices.
Remarks
- Both methods enhance the game's dynamics by allowing characters to change or affirm their family affiliations, impacting their role in the game world.
- The option to set the joined family as the actor's origin family adds depth to character backstories and can influence character arcs and relationships.
- These methods are essential in narrative-driven games, role-playing games, or any game where family heritage and lineage influence gameplay and story.