SchemeIsActive: Difference between revisions
Tayfunwiki (talk | contribs) (Created page with "== <code>SchemeIsActive</code> Method in Actor Class == === Overview === The <code>SchemeIsActive</code> method in the <code>Actor</code> class is designed to verify if a specific scheme is active based on provided conditions. This method is crucial in games where schemes, plots, or strategic actions play a significant role in the narrative, character interactions, or gameplay mechanics. === Syntax === <syntaxhighlight lang="c#"> public bool SchemeIsActive(string schem...") |
Tayfunwiki (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
== <code>SchemeIsActive</code> | == <code>SchemeIsActive</code> Methods in Actor Class == | ||
=== | === Method 1: Verify Scheme Based on Conditions === | ||
=== Syntax === | ==== Syntax ==== | ||
<syntaxhighlight lang="c#"> | <syntaxhighlight lang="c#"> | ||
public bool SchemeIsActive(string schemeNameOrId, VerifyType type, Actor target = null) | public bool SchemeIsActive(string schemeNameOrId, VerifyType type, Actor target = null) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Parameters === | ==== Parameters ==== | ||
* <code>schemeNameOrId</code> (string): | * <code>schemeNameOrId</code> (string): The identifier of the scheme. | ||
* <code>type</code> (VerifyType): The type of verification | * <code>type</code> (VerifyType): The type of verification (ToTarget, ToAnyone, FromAnyone). | ||
* <code>target</code> (Actor): Optional. The actor | * <code>target</code> (Actor): Optional. The actor to check against (only for ToTarget). | ||
=== | ==== Functionality ==== | ||
Checks if a scheme is active based on specific conditions and verification types. | |||
=== Method 2: Check if Scheme is Active === | |||
=== | ==== Syntax ==== | ||
<syntaxhighlight lang="c#"> | |||
public bool SchemeIsActive(string schemeNameOrId) | |||
</syntaxhighlight> | |||
==== Parameters ==== | |||
==== | * <code>schemeNameOrId</code> (string): The identifier of the scheme. | ||
==== Functionality ==== | |||
Verifies if the specified scheme is currently active, without targeting specifics. | |||
=== Method 3: Verify Scheme Against a Target === | |||
==== Syntax ==== | |||
<syntaxhighlight lang="c#"> | <syntaxhighlight lang="c#"> | ||
public Actor | public bool SchemeIsActive(string schemeNameOrId, Actor target) | ||
</syntaxhighlight> | |||
==== Parameters ==== | |||
* <code>schemeNameOrId</code> (string): The identifier of the scheme. | |||
* <code>target</code> (Actor): The actor target to check against. | |||
==== Functionality ==== | |||
Checks if a scheme is specifically active against a given target actor. | |||
=== | === Common Usage === | ||
Used in strategy and role-playing games to determine the status of schemes for gameplay decisions and character interactions. Essential for tracking schemes in dynamic game environments. | |||
==== Example ==== | |||
<syntaxhighlight lang="c#"> | |||
public Actor conspirator; | |||
public Actor target; | |||
string schemeId = "Assassination"; | |||
// Example for Method 1 | |||
bool isSchemeActive = conspirator.SchemeIsActive(schemeId, VerifyType.ToTarget, target); | |||
// Logic based on the scheme's activity status | |||
</syntaxhighlight> |
Revision as of 15:31, 23 December 2023
SchemeIsActive
Methods in Actor Class
Method 1: Verify Scheme Based on Conditions
Syntax
public bool SchemeIsActive(string schemeNameOrId, VerifyType type, Actor target = null)
Parameters
schemeNameOrId
(string): The identifier of the scheme.type
(VerifyType): The type of verification (ToTarget, ToAnyone, FromAnyone).target
(Actor): Optional. The actor to check against (only for ToTarget).
Functionality
Checks if a scheme is active based on specific conditions and verification types.
Method 2: Check if Scheme is Active
Syntax
public bool SchemeIsActive(string schemeNameOrId)
Parameters
schemeNameOrId
(string): The identifier of the scheme.
Functionality
Verifies if the specified scheme is currently active, without targeting specifics.
Method 3: Verify Scheme Against a Target
Syntax
public bool SchemeIsActive(string schemeNameOrId, Actor target)
Parameters
schemeNameOrId
(string): The identifier of the scheme.target
(Actor): The actor target to check against.
Functionality
Checks if a scheme is specifically active against a given target actor.
Common Usage
Used in strategy and role-playing games to determine the status of schemes for gameplay decisions and character interactions. Essential for tracking schemes in dynamic game environments.
Example
public Actor conspirator;
public Actor target;
string schemeId = "Assassination";
// Example for Method 1
bool isSchemeActive = conspirator.SchemeIsActive(schemeId, VerifyType.ToTarget, target);
// Logic based on the scheme's activity status