Is it okay to?

odd17

New Member
Reaction score
1
Have about 20 periodic triggers average every 0.10 of game time and all of them have "initially on" unchecked and can be turned on when needed individually by other triggers and then turn it off again?
 

TomTTT

New Member
Reaction score
44
I'm pretty sure it won't be a problem even if all of them were on together.
 

Parsival

Active Member
Reaction score
6
Of course it's not always ok.
It depends on number of actions in those triggers. For example, yesterday I created trigger with periodic event (every 0.01s.) with 2 'ifs', and 2 'for' loops. It was lagging like hell.

Remember about other players which can have worse computers. Try to optimize your triggers as strong as you can. Always turn off your periodic triggers when they are not longer usefull.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
I created trigger with periodic event (every 0.01s.) with 2 'ifs', and 2 'for' loops. It was lagging like hell.
anything that runs 100 times per second causes heavy lags
because normal FPS is 60 (60 frames per second) and this executes 100 times per second
meaning it's pointless setting it that low because your eye can't even theoretically notice the difference

I used my logic here though, I might be wrong
 

Ayanami

칼리
Reaction score
288
Of course it's not always ok.
It depends on number of actions in those triggers. For example, yesterday I created trigger with periodic event (every 0.01s.) with 2 'ifs', and 2 'for' loops. It was lagging like hell.

Remember about other players which can have worse computers. Try to optimize your triggers as strong as you can. Always turn off your periodic triggers when they are not longer usefull.

It's not always the number of actions. It's what the trigger does. For example, creating a unit every 0.01 seconds is insane. But just calculating values, etc, should be fine. Though, a few hundred would not really be that okay.

But honestly, 0.01 second is a serious over-kill.
 

Parsival

Active Member
Reaction score
6
Hah. Of course it was a completely non-sense. It was just an example of my fail. ;)
But hey. Sometimes triggers with periodic event (every 0.01s.) are necessary and it doesn't really lag. Example: camera chasing system.

Anyway, it's obvious it doesn't depend on number of GUI actions, but number of final code lines, so creating new unit needs more power than changing player's camera position.
 

Romek

Super Moderator
Reaction score
963
> Sometimes triggers with periodic event (every 0.01s.) are necessary and it doesn't really lag. Example: camera chasing system.
That's still unnecessary. 0.03 seconds would suffice, and you wouldn't be able to tell the difference. It doesn't seem like much, but that'd result in a third of the actions being called over the course of the game.
 
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