Advice: Reoccurring event limit?

futeki

Active Member
Reaction score
4
Is there a recommended limit to reoccurring events?

e.g.
Trigger:
  • Time - Every 30.00 seconds of game time


I've got close to 8 running in my map, most of the actions are simple and involve just updating integer values... but I'm curious if I'm able to add a few more.

Anyone else ever experience problems?
 

Goober4473

TH.net Regular
Reaction score
7
It takes doing some pretty extremely complex things constantly for there to be any problem. I hit a point in a mod where it was lagging from all the calculations, but that was an entire goal-based AI system for an interactive story project running every half second, and it was still just a tiny bit laggy.
 

futeki

Active Member
Reaction score
4
It takes doing some pretty extremely complex things constantly for there to be any problem. I hit a point in a mod where it was lagging from all the calculations, but that was an entire goal-based AI system for an interactive story project running every half second, and it was still just a tiny bit laggy.

I've got loads of custom AI going on, but most of those triggers are every 10-120 seconds.

I just wondered if I had so many triggers automatically running, would it lag the entire map? -- I suppose the replies answer my question, no.

The only issue I've had is this one trigger that counts the types of units, and it seems to cause a moment of lag but goes away quickly. Sad part is, there's only 200 units for it to count.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
well it depends on numerous factors whether a map lags or not. of course, periodic events are, by far, the worst performance wise. but you cannot say periodic events cause laggs because it always depends on the rest of the map, the functions called, the computers hard- and software and many many other things.
 

Bogrim

y hello thar
Reaction score
154
There are some factors in the contribution to lag from periodic events that you cannot avoid in GUI. For example, setting a unit group has an internal leak of a local variable and running several periodic time events setting unit groups frequently would make that insignificant leak more visible in your game play.

When a periodic event doesn't need to run, just be sure to turn off the trigger (and turn it back on when you need it). It's like conserving energy in your home. ;-)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top