emrys90
1
How do you trigger an event in C# for a coroutine? This works fine when it’s not a coroutine, but if I check the coroutine box it gives an error
var reference = GraphReference.New(macro, false);
reference.TriggerEventHandler(hook => hook.name == "Custom", new CustomEventArgs("ActivateAbility"), parent => true, true);
emrys90
2
It gives the following error by the way:
NullReferenceException: Object reference not set to an instance of an object
Ludiq.GraphPointer.GetElementData[T] (Ludiq.IGraphElementWithData element) (at Ludiq.Graphs.Runtime/GraphPointer.cs:346)
Bolt.EventUnit1[TArgs].Run (Bolt.Flow flow) (at Bolt.Flow.Runtime/Framework/Events/EventUnit.cs:175) Bolt.EventUnit1[TArgs].Trigger (Ludiq.GraphReference reference, TArgs args) (at Bolt.Flow.Runtime/Framework/Events/EventUnit.cs:150)
Bolt.XEventGraph.TriggerEventHandler[TArgs] (Ludiq.GraphReference reference, System.Func2[T,TResult] predicate, TArgs args, System.Func2[T,TResult] recurse, System.Boolean force) (at Bolt.Core.Runtime/Events/IEventGraph.cs:18)
BattleManager.ExecuteOutputMacro (Ludiq.GraphReference reference) (at Assets/BattleManager.cs:43)
BattleManager.Start () (at Assets/BattleManager.cs:20)
Did you figure this out? I just ran into the same problem and could really use a helping hand here 