Just need a logic check for my eventing

● ARCHIVED · READ-ONLY
Started by Solaire 10 posts View original ↗


  1. This is a rough draft for a day night system using Victor Engine - Light Effects

    I just need somebody to check over my logic to make sure there aren't any flaws in this.

    I have the initial timer to start when the players creates a new game, just so that it doesn't get recreated each time this event runs, also the color values are just random numbers they don't actually have the correct values I want.
  2. I'm not noticing anything standing out.

    Have you tried running it yet? Just set all the timer to a few seconds instead of minutes and try running it...best way to figure out if something is working or not.
  3. The first tint happens but the second one does not. I added a text message to pop up right before changing tint and that doesn't even show up.
  4. Are you running this as a parallel process?

    Wait I think see a problem. It looks like it's repeating the variable increment, thus it'll never reach the next part. Think you need to move the +1 variable into the conditional so it doesn't run again.

    Like this:

    V4cyw.png
  5. I thought it had to repeat. I thought that when a player move to a different map that the tint goes away. That's why I had it repeating the tint so that if a player changes map the tint will just reset.
  6. I was referring to the increasing variable. For example: once the timer hits 18 minutes it's going to increase the variable by 1 over and over every time it loops through the event.

    I don't think tint resets when changing maps so you shouldn't need to keep setting it (assuming you're using normal fading and not tinting the screen black).
  7. Yeah I just tried your method and it works but when using the light script I am you need to reapply the tint every time you change maps.

    So I need more troubleshooting



    this is what I have now, the added conditional branches should make it so the +1 to day/night only occurs once.
  8. Ah. I've never used that script so I was assuming it was similar to the tint function.

    Thinking about it, I would probably keep it the way I had it (replacing tint with the script function), then create a Common Event that simply checks what the variable is and tints the screen. Every time you switch maps, you add that Common Event to it and let it handle the tinting (you could even add it to the Parallel Process as well). That way the tinting effect isn't constantly being run which might cause lag or other strange oddities to occur.

    I still see some errors in the way you set up the Event particularly with how you're using the Else branches. For example, when the timer drops under 23 minutes and the variable is not equal to 1, it's going to increase it which will break the Event once the timer hits 22 minutes. However, it won't run the 22 minute part because there is nothing to increase the variable past 1 so it will be skipped, as well as everything else. Else branches will only run if the condition is false (notice how I didn't use any when I made the event), otherwise it'll run the other branch.
  9. Espon said:
    I still see some errors in the way you set up the Event particularly with how you're using the Else branches. For example, when the timer drops under 23 minutes and the variable is not equal to 1, it's going to increase it which will break the Event once the timer hits 22 minutes. However, it won't run the 22 minute part because there is nothing to increase the variable past 1 so it will be skipped, as well as everything else. Else branches will only run if the condition is false (notice how I didn't use any when I made the event), otherwise it'll run the other branch.
    I don't think you're reading it correctly. The conditional branches that check the variable are being used correct.

    -Is the timer 23 minutes or less

    -then is the variable == 1

    -no? then you better add 1 to it

    - is the variable == 1

    -yes? then tint the screen like so

    -repeats-

    -is the timer less then 23 minutes

    -then does variable == 1

    -alright then do nothing

    -is it still 1

    -yes? then tint again.

    explaining it with words seemed like a better idea in my head...

    But I do agree that refreshing the tint could cause some errors, but it's really hard for me to check if it will because my computer handles it fine, even in large maps with multiple events going.
  10. Yes that part is fine, but it breaks beyond that point. It'll never reach the check for 22 minutes because there's nothing to set the variable beyond 1 so it'll just keep looping through the second tint until the timer is reset.

    If the variable did somehow become 2, then it's going to run the 23 minute variable Else branch again since it no longer equals 1, and then it'll just keep adding 1 each time it goes through the cycle.