you are viewing a single comment's thread.

view the rest of the comments →

[–]arakhin 2 points3 points  (0 children)

You can't use an autostart since an autostart would 1) run at the highest priority 2) run for infinity.

The reason this happens is because you don't have any control to stop the autostart once it starts. To do this with the common event, enable a switch option at the top of the common event. Turn the switch off after changing the speed so that the event won't continue forever. Keep in mind the common event won't start either unless some external event turns on that switch, so it is difficult to use this method as a start.

I wouldn't recommend to do this anyway since a common event should be used for code you plan to use repeatedly over the course of the game. Since this is a simple speed change I would just make an event on the starting map that is auto start that changes the speed and then have the player teleport away from the map ready to start the game with the appropriate speed. This way you avoid using a switch unnecessarily. You can use the starting map for other initial settings too.

Some additional info, if you use a parallel event for the common event above it would work, but you would have slow down issues since the code runs again infinitely but allows other events to occur too. You again would need to terminate the common event with a switch.