Just need a logic check for my eventing

Solaire

grossly incandescent
Member
Joined
Mar 18, 2012
Messages
10
Reaction score
0
First Language
English
Primarily Uses


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.
 
Last edited by a moderator:

Espon

Lazy Creator
Veteran
Joined
Mar 20, 2012
Messages
1,810
Reaction score
192
First Language
Gibberish
Primarily Uses
RMMV
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.
 

Solaire

grossly incandescent
Member
Joined
Mar 18, 2012
Messages
10
Reaction score
0
First Language
English
Primarily Uses
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.
 

Espon

Lazy Creator
Veteran
Joined
Mar 20, 2012
Messages
1,810
Reaction score
192
First Language
Gibberish
Primarily Uses
RMMV
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:

 
Last edited by a moderator:

Solaire

grossly incandescent
Member
Joined
Mar 18, 2012
Messages
10
Reaction score
0
First Language
English
Primarily Uses
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.
 

Espon

Lazy Creator
Veteran
Joined
Mar 20, 2012
Messages
1,810
Reaction score
192
First Language
Gibberish
Primarily Uses
RMMV
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).
 

Solaire

grossly incandescent
Member
Joined
Mar 18, 2012
Messages
10
Reaction score
0
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Espon

Lazy Creator
Veteran
Joined
Mar 20, 2012
Messages
1,810
Reaction score
192
First Language
Gibberish
Primarily Uses
RMMV
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.
 

Solaire

grossly incandescent
Member
Joined
Mar 18, 2012
Messages
10
Reaction score
0
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Espon

Lazy Creator
Veteran
Joined
Mar 20, 2012
Messages
1,810
Reaction score
192
First Language
Gibberish
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top