COMMON EVENT RESTARTING IN ACE!
Posts
Pages:
1
Hey! Need some help! So I want my common event to continue over all my maps (its a clock night day system) but whenever i change map the event starts back from the beginning! This is very problematic! Any ideas? Thanks!
Post a screenshot or copy-paste the contents of your event here, and we'll pick the problem out of that.
I see what's wrong here. You literally have it set up to go through an entire manual cycle of 24 hours. Not only is this horribly inefficient, autorun events are not designed to pick up where they left off if they have several commands to get through and the map changes. I don't think you could even accomplish this the way you were planning to without the editor just crashing at a certain point.
You need a different approach. For starters, you're thinking of using 288 switches for each 5 minute interval of time. Why do that when you can use just 1 variable? Create a variable that stores the time and increments by 1 every second. Then, in another event, use a series of conditional branches that checks the current time and updates the clock picture based on the values. To make this even easier, you can use separate variables for seconds, minutes, and hours.
Your event should begin with this:
Make the "update clock" common event separately. Here, you need to check the hours and minutes variables to determine which "hands" pictures to display on the clock. This will require a lot of nested conditional branches, and will look something like:
A common event for updating the "tints" will work similarly to the previous one, except you will need nested conditional branches again for the hours. Something like this:
I hope you get the idea. If you need any further clarification, let me know. This may have been a lot to absorb.
You need a different approach. For starters, you're thinking of using 288 switches for each 5 minute interval of time. Why do that when you can use just 1 variable? Create a variable that stores the time and increments by 1 every second. Then, in another event, use a series of conditional branches that checks the current time and updates the clock picture based on the values. To make this even easier, you can use separate variables for seconds, minutes, and hours.
Your event should begin with this:
> Wait 60 framesThis adds 1 to the seconds variable every second (keeping in mind that 60 frames = 1 second), then updates the minutes and hours variables appropriately. This way the exact time will always be stored client-side, so the values will remain the same during map changes (and the event will just keep counting when you load in), and you can reference them directly in other events. You won't need those "morning"/"afternoon"/"night" switches because you can just reference hours and minutes using conditional branches. You can still use them if you want, though. The "update clock" switch will occur after a full minute has passed and call a second common event (which doesn't need to be autorun or parallel process).
> Add 1 to the SECONDS variable
> Conditional branch: if SECONDS variable is equal to 60
--> Set the SECONDS variable to 0
--> Add 1 to the MINUTES variable
--> Turn on a "UPDATE CLOCK" switch
>
> Conditional branch: if MINUTES variable is equal to 60
--> Set the MINUTES variable to 0
--> Add 1 to the HOURS variable
>
> Conditional branch: if HOURS variable is equal to 24
--> Set the HOURS variable to 0
> Branch End
> Conditional branch: if "UPDATE CLOCK" switch is ON
--> Call "UPDATE CLOCK" common event
--> Turn off "UPDATE CLOCK" switch
>
Make the "update clock" common event separately. Here, you need to check the hours and minutes variables to determine which "hands" pictures to display on the clock. This will require a lot of nested conditional branches, and will look something like:
> Show picture 1: CLOCK BACKGROUND.pngI didn't include every branch in the example (hence the ... for the in-betweens), but you will need to make every one. When this event is called, it will display the proper minute and hour hands depending on the respective variables. It's better to do this in a separate common event so that it runs more efficiently (checking every minute will be easier on most people's computers than checking every second). It will also allow you to automatically update the clock if you set the in-game time to a set time (ex. party goes to bed, you want them to wake them up at 4 for an attack and automatically update the clock to reflect this).
> Conditional branch: if MINUTES is above or equal to 0
--> Conditional branch: if MINUTES is below 5
----> Show picture 2: BIG HAND POINTING AT 12.png
-->
>
> Conditional branch: if MINUTES is above or equal to 5
--> Conditional branch: if MINUTES is below 10
----> Show picture 2: BIG HAND POINTING AT 1.png
-->
>
...
> Conditional branch: if MINUTES is above or equal to 55
--> Conditional branch: if MINUTES is below 60
----> Show picture 2: BIG HAND POINTING AT 11.png
-->
>
> Conditional branch: if HOURS equal to 0
--> Show picture 3: SMALL HAND POINTING AT 12.png
>
> Conditional branch: if HOURS equal to 1
--> Show picture 3: SMALL HAND POINTING AT 1.png
>
...
> Conditional branch: if HOURS equal to 23
--> Show picture 3: SMALL HAND POINTING AT 11.png
>
A common event for updating the "tints" will work similarly to the previous one, except you will need nested conditional branches again for the hours. Something like this:
> Conditional branch: if HOURS is above or equal to 8And so on. Then add a "call event" command for it in the main event, right underneath the one for "update clock".
--> Conditional branch: if HOURS is below 10
----> Tint screen: (morning colors)
-->
>
> Conditional branch: if HOURS is above or equal to 10
--> Conditional branch: if HOURS is below 12
----> Tint screen: (mid-morning colors)
-->
>
I hope you get the idea. If you need any further clarification, let me know. This may have been a lot to absorb.
Genius! You're going to laugh when I tell you that I actually did those 288 switches... Ok i'm gonna try this seems solid! Works like a bloody dream. And so quick compared to the three or four hours it took me to make the other system (that didnt even work)! I don't know why but I always seem to go for switches and kind of forget variables, but they have so many possibilities!
Pages:
1
















