Jump to content

Autospawn not initializing

Pending 1.0.3

CPan
CPan

Posted

I found that the event wasn't autostarting when the deep sea spawned. I reviewed the code and found that the StartEventTimer routine appears to not process correctly. If (ship != null) will always be false because the ship isn't there yet. I updated the code on my test server to be:
 

Quote

private void StartEventTimer(bool initial)
        {
            . . .
            eventTimer = timer.In(delay * 60, () =>
            {
                if (ship == null) 
                {  SpawnCargo();
                }
            });
        }

and that appears to have fixed my issue.

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.4m
Total downloads
Customers
10.9k
Customers served
Files Sold
156.7k
Marketplace sales
Payments
3.4m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.