I may be completely stupid, but I struggle to understand how to use Triggers in HS4.
I want to check if particular trigger should be fired, obviously. So I call one of
(already confusing - which one?)
So I get an array of TrigActInfo. Now I need to compare some property of each trigger with some value. How? I need to de-serialize TrigActInfo to AbstractTriggerType, right?
In your sample plugin you construct SampleTriggerType explicitly because you have only one trigger type. If I have multiple triggers/subtriggers - what do I do? Just try to construct each one from TrigActInfo and see if it fails? I'm lost...
The wonderful SDK provides wonderful function
That's what I need. But it's PRIVATE?
I want to check if particular trigger should be fired, obviously. So I call one of
Code:
hs.TriggerMatches hs.GetTriggersByType hs.GetTriggersByInterface
So I get an array of TrigActInfo. Now I need to compare some property of each trigger with some value. How? I need to de-serialize TrigActInfo to AbstractTriggerType, right?
In your sample plugin you construct SampleTriggerType explicitly because you have only one trigger type. If I have multiple triggers/subtriggers - what do I do? Just try to construct each one from TrigActInfo and see if it fails? I'm lost...
The wonderful SDK provides wonderful function
Code:
private AbstractTriggerType GetObjectFromTrigInfo(TrigActInfo trigInfo)

Comment