Trigger Evaluation

keychup

Active Member
Reaction score
34
So I came up with this system a long time ago. Id like to know what you think and spot any drawbacks.

The trigger basically runs periodic events so that i won't have to create multiple triggers using the [Time - Every X seconds] event

Id also like to know if it is necessary and if it improves anything at all.

Trigger:
  • periodic
    • Events
    • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
    • Set zz_periodic = (zz_periodic + 1.00)
    • Set zz_periodicmod = (zz_periodic mod 3.00)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • zz_periodicmod Equal to 0.00
    • Then - Actions
    • -------- 0.03 second interval: run triggers here with appropriate conditions --------
    • Else - Actions
    • Set zz_periodicmod = (zz_periodic mod 10.00)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • zz_periodicmod Equal to 0.00
    • Then - Actions
    • -------- 0.10 second interval: run triggers here with appropriate conditions --------
    • Else - Actions
    • Set zz_periodicmod = (zz_periodic mod 25.00)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • zz_periodicmod Equal to 0.00
    • Then - Actions
    • -------- 0.25 second interval: run triggers here with appropriate conditions --------
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • zz_periodic Equal to 30.00
    • Then - Actions
    • Set zz_periodic = 0.00
    • Else - Actions
 

keychup

Active Member
Reaction score
34
tell me more about if then else. is it not the same as using event condition action?
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
it is better to just use timer/periodic, the way you have now you are using and setting variables you don't really need to. Not to mention that if there are conflicts it is harder to locate them since you got it all ran from 1 source. Then there is all the if then else's you are using, why run 4+ checks when you only need to run 1. Also consider that you are running it 100 times a sec, so 400 checks a sec, as far as processing time goes that is nothing but still why do it if you don't need to. It is just 3 extra things to do before the next trigger can run.
 

keychup

Active Member
Reaction score
34
and there it is. i will have to reconfigure my map after all. your observations have been noted. i express my gratitude.
 
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