From Intrigues Wiki
Trigger Node

onTrigger Event in IM Class


The onTrigger event in the IM (Intrigue Manager) class is designed to respond to specific conditions within the game, particularly those involving triggers activated by the TriggerNode.


  • Event Type: Action<Scheme, string, bool>
  • Functionality:
    • This event is triggered under certain conditions, and it carries along three parameters: a Scheme object, a string identifier, and a bool status.
    • It is configured to handle triggers that are activated specifically through the 'Scheme' input of a TriggerNode, offering a focused mechanism for responding to scheme-related events within the game.


The onTrigger event is crucial for capturing and handling trigger events that are set off via the 'Scheme' input of the TriggerNode. This allows for targeted responses to events directly tied to specific schemes, enhancing the interactivity and narrative depth of the game.


  • TriggerNode Integration: The event is particularly attuned to listening for triggers that are activated through the 'Scheme' input of the TriggerNode. This enables the event to specifically handle triggers related to particular schemes, making it an essential tool for scheme-based gameplay mechanics and storytelling.

Example of Usage

public class SchemeTriggerHandler : MonoBehaviour {
    void OnEnable() {
        IM.onTrigger += HandleSchemeTrigger;

    void OnDisable() {
        IM.onTrigger -= HandleSchemeTrigger;

    private void HandleSchemeTrigger(Scheme scheme, string triggerId, bool status) {
        Debug.Log($"Scheme Trigger Activated: {triggerId}, Status: {status}, In Scheme: {scheme.SchemeName}");
        // Implement logic to respond to the scheme-specific trigger event
        // This could involve changing the course of the scheme, updating game states, or initiating new narrative paths


  • HandleSchemeTrigger: This method, subscribed to the onTrigger event, is invoked when a trigger related to a specific scheme is activated. It processes the received information, allowing for responses tailored to the context of the scheme.


  • The onTrigger event is a vital component for games that employ complex scheme systems, where triggers play a significant role in unfolding events and shaping the player's experience.
  • Proper implementation of this event handler enables developers to create dynamic and responsive gameplay, where player actions or environmental changes can have meaningful impacts on ongoing schemes.