Rule:Return Actor Node

From Intrigues Wiki
Revision as of 17:35, 9 February 2024 by Tayfunwiki (talk | contribs) (Created page with "thumb|Return Actor <b>Description</b><div class="description" style="padding-left:35px;">By creating a method in the specified format, you can reference any actor of your choice. For instance, if you want to reference the '''Heir''' of a '''Conspirator''', the '''Return Actor Node''' will facilitate this for you.</div><syntaxhighlight lang="c#" start="1"> [GetActor("Get Leader")] private Actor GetLeader(Scheme scheme) { return scheme.Conspi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return Actor

Description

By creating a method in the specified format, you can reference any actor of your choice. For instance, if you want to reference the Heir of a Conspirator, the Return Actor Node will facilitate this for you.
[GetActor("Get Leader")]
private Actor GetLeader(Scheme scheme) {
    return scheme.Conspirator.Clan?.GetMember("Leader");
}

[GetActor("Get Target Heir")]
private Actor FindTargetHeir(Scheme scheme)
{
    return scheme.Target.Heir;
}
        
[GetActor("Get Conspirator Heir")]
private Actor FindConspiratorHeir(Scheme scheme)
{
    return scheme.Conspirator.Heir;
}

» The method must return a value of the Actor type.

» The method should be marked using the [GetActor] attribute. (Using this attribute, you can give a specific name to the method.)

Outputs

» [Actor]: Transfers the referenced actor to the next node.

» [Null]: If the method returns a null value, the flow continues from here.