Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// @function wait_reset([index]);
- /// @param {int|string} index
- /// @author Lucas Chasteen <lucas.chasteen@xgasoft.com>
- /// @copyright XGASOFT 2018, All Rights Reserved
- /*
- Resets a timer created with "wait".
- If no timer index is specified, all timers will be reset.
- Example usage:
- wait_reset("my_timer");
- wait_reset();
- */
- //If timer data exists...
- if (ds_exists(global.ds_wait, ds_type_map)) {
- if (argument_count > 0) {
- //Reset individual timer, if specified
- if (ds_map_exists(global.ds_wait, argument[0])) {
- ds_map_delete(global.ds_wait, argument[0]);
- }
- } else {
- //Otherwise reset all timers
- ds_map_destroy(global.ds_wait);
- global.ds_wait = -1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement