Set Actor Node: Difference between revisions

From Intrigues Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[File:1.0.4b Feature.gif|thumb|Adding new actors to the story.gif]]
[[File:1.0.4b Feature.gif|thumb|Adding new actors to the story.gif]]
== Set Actor Node ==
=== Description ===
The Set Actor Node assigns an actor, received from the "Return Actor Node," to a variable designated for a specific actor type. This process allows for dynamic updates to actor roles within the narrative based on game logic.
=== Features ===
* Dynamically updates actor assignments.
* Enhances narrative flexibility by allowing changes in character roles.
=== Usage ===
Ideal for scenarios requiring the adaptation of character roles or states in response to player actions or story developments.
<syntaxhighlight lang="c#" line="1">
using UnityEngine;
namespace Nullframes.Intrigues.Demo
{
    public class Demo_Methods : MonoBehaviour
    {
        [GetActor("Get Clan Leader")]
        private Actor GetLeader(Scheme scheme) {
            return scheme.Schemer.Conspirator.Clan?.GetMember("Leader");
        }
    }
}
</syntaxhighlight>

Latest revision as of 08:52, 19 February 2024

Adding new actors to the story.gif

Set Actor Node

Description

The Set Actor Node assigns an actor, received from the "Return Actor Node," to a variable designated for a specific actor type. This process allows for dynamic updates to actor roles within the narrative based on game logic.

Features

  • Dynamically updates actor assignments.
  • Enhances narrative flexibility by allowing changes in character roles.

Usage

Ideal for scenarios requiring the adaptation of character roles or states in response to player actions or story developments.

using UnityEngine;

namespace Nullframes.Intrigues.Demo
{
    public class Demo_Methods : MonoBehaviour
    {
        [GetActor("Get Clan Leader")]
        private Actor GetLeader(Scheme scheme) {
            return scheme.Schemer.Conspirator.Clan?.GetMember("Leader");
        }
    }
}