Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - q308744928

#1
Help / how to call a method?
November 01, 2021, 03:25:42 PM
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;
}
}