SchemeIsActive: Difference between revisions

From Intrigues Wiki
No edit summary
No edit summary
 
Line 53: Line 53:
public Actor conspirator;
public Actor conspirator;
public Actor target;
public Actor target;
string schemeId = "Assassination";
string schemeName = "Assassination";


// Example for Method 1
// Example for Method 1
bool isSchemeActive = conspirator.SchemeIsActive(schemeId, VerifyType.ToTarget, target);
bool isSchemeActive = conspirator.SchemeIsActive(schemeName, VerifyType.ToTarget, target);
// Logic based on the scheme's activity status
// Logic based on the scheme's activity status
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 15:34, 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 schemeName = "Assassination";

// Example for Method 1
bool isSchemeActive = conspirator.SchemeIsActive(schemeName, VerifyType.ToTarget, target);
// Logic based on the scheme's activity status