[CGMZ] Idle (Patreon)
Downloads
Content
! SEE BOTTOM OF POST FOR UPDATES !
This plugin allows you to define a set amount of frames before the player is considered idle. Frames are counted from the last frame the player made any type of input. After entering Idle state, the plugin will automatically turn a switch ON and begin incrementing a variable by 1 every frame. This will allow you to event what occurs when the player is idle, such as causing the player's sprite to slowly change to a sleeping sprite or doing some other action after turning idle.
Once the player resumes playing and sends inputs to the game, the idle status will be cleared and the switch/variable will be reset to OFF or 0.
Should you not want to use the automatic switch or variable, there also exist plugin commands to turn a switch ON/OFF by idle status and set a variable to how many frames the player has been idle.
Want additional features not already present? Leave your suggestions below or in my discord under the #suggestions channel!
Happy RPG Making!
This update adds the option to run a common event when entering the idle state, and another common event when leaving the idle state. This should hopefully help you with any events you use to make your idle behaviors.
This update adds an option to only trigger the common events for idle start/stop if the player is on the map scene. With this enabled, idle common events will no longer be queued from places like the menu, which could cause them to run when the menu is exited.
This update also adds a plugin command to enable or disable the player from entering the idle state. This value is part of save data. One idea behind this is that you can use it to prevent the player from going idle while they may be watching a cutscene, and then re-enable idle after the cutscene ends.
This update adds some more plugin commands to help you control the idle state. You can now force the idle state on the player as well as clear the idle state in case the player is idle. You can use this in case you want to make sure the player is idle for some cutscene, or if you want them to not be idle for some cutscene. These plugin commands will not have any effect if the player is already idle (in the case of forcing them to be idle) or already not idle (in the case of clearing idle status).
This version adds some stat tracking for total time spent idle throughout the game. It also adds a plugin command to get this new statistic. I plan to also add this as a potential stat you can display in the [CGMZ] Extra Stats statistics scene as well.