Hi everyone. This is a trigger for a super weapon(Droner, WeatherControlor, SunBlocker etc.) in the mech cluster, when the countdown this.ticksToInsanityPulse reaches 0, the function this.DoDronerInsanityField() works.
As we know sometime when the super weapon landed, the game gives it an Initialization timer, usually 7 to 15 days. My problem is !a.Active does not work, it always give a true value even when the Initialization timer is not 0.
How can i properly get this Active feedback?
public override void CompTick()
{
CompCauseGameCondition a = new CompCauseGameCondition();
if (!this.parent.Spawned || !a.Active)
{
return;
}
this.ticksToInsanityPulse--;
if (this.ticksToInsanityPulse <= 0)
{
this.DoDronerInsanityField();
this.ticksToInsanityPulse = this.Props.pulseInterval.RandomInRange;
}
}