Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// @function wait_get_time(index);
- /// @param {int|string} index
- /// @author Lucas Chasteen <lucas.chasteen@xgasoft.com>
- /// @copyright XGASOFT 2018, All Rights Reserved
- /*
- Returns the current time remaining in the specified timer as a value of seconds.
- If the timer does not exist, 0 will be returned instead.
- Example usage:
- var time_remaining = wait_get_time("my_timer")
- draw_text(x, y, string(time_remaining));
- */
- //If timer data exists...
- if (ds_exists(global.ds_wait, ds_type_map)) {
- if (ds_map_exists(global.ds_wait, argument[0])) {
- //... return the remaining time
- return global.ds_wait[? argument[0]];
- }
- }
- //Otherwise return 0
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement