• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

time based functions

  1. Funny Paradox

    GameMaker Can you get the exact time an input has occured ?

    I'm working on a rhythm game and because the bpm isn't always a multiple of the game's fps sometime an input can only get recognized between two beats (it still recognize it as the game have a fairly big buffer, the closest you press to the beat the more points you win) but you will rarely even...
  2. L

    Trouble to get timezone_utc to work

    So the trouble is I don't get timezone_utc. I want depending on the specific timezone u currently in the correct flag will display. The global.flagX will display a specific image_index so it just this code thats the issue. var currentOffsetSeconds = date_get_timezone(); // Get current UTC...
  3. kamiyasi

    Asset - Scripts Real-Time Day/Night Cycle System for GMS2

    https://marketplace.yoyogames.com/assets/11463/real-time-time-of-day-system I developed a real-time day/night cycle system for one of my games, and decided to expand upon it for the marketplace. This system contains a script that can be used to add a real-time time of day system for your games...
  4. S

    Timestamp and Offline Tutorial Help

    Could someone point me in the direction of a tutorial or post about saving a timestamp on game_end() then subtracting the difference between timestamps when opening the game again? I want to use the difference to add it to crop growth or skill advancement while the game is off. To give an...
  5. Dune Veteran

    Android How to prevent players from time-cheating an idle game?

    Hi, I' working on an Android game where things happen even when not actively playing - e.g. you can send a trade ship for 8 hours, plant crops which take 2 hours till harvest, gold accumulates in a bank over time... And all of these can be easily cheated, if the player changes his device time by...
  6. M

    Android Date & Time function on Mobile

    Hi everyone, I'm trying to create a timed event for my mobile game. Essentially, it's supposed to occur every 3 days after the 1st day it happens. But now its not happening at all. I used the "date_time" function from GMS2. It works fine on PC but not on mobile. Does my app need to request...
  7. M

    GameMaker Calendar Days Timed Event

    Hi everyone, I'm currently developing a mobile game with a programmer and we're stuck on one issue. The game will feature a timed event. This event will occur when special conditions are met (Staying 3 mins on the main menu screen without touching anything). Once this event plays, I want it to...
  8. kamiyasi

    GameMaker Is there a way to use script function parameters in a timeline?

    I've been using GM for around 13 years but I have rarely ever worked with timelines. Right now I have something like this... timeline_moment_add_script( currentTimeline, 60, createEnemy ) Now, this is all fine and dandy, but what would be great is if I could use function parameters. What I...
  9. M

    SOLVED Wait X second before change room

    I want to change room when my character die (i know i must use room_goto(roomName)), but before it i want to wait X second. I try with a while loop that stop code and use the current_time variable and the difference between it and a bigger variable. But this method block all the game. Ther's a...
  10. Enreeper

    Legacy GM [Solved] if String = otherString not working !

    Hi, I have an Problem. i Have written an Car Ai Test Game Were Cars Race each other. but you have to open it in Multiply Windows thats not the Problem. The Problem is that i have to click on start on each of them. but if i do that they startet at different times. Now i want that all Cars...
  11. S

    Trying to have a sprite change dependent on real time clock [Solved]

    I think I should preface this with the fact that I'm an artist by trade, and coding isn't a thing I do remotely often, so if I made a real dumb mistake, that's why. I have a sprite with 2 sub images, and I want it to show image 0 from 6am to 6pm, and then image 1 from 6pm to 6am. I couldn't...
  12. O

    GameMaker What's an easy way to have the current time displayed.

    I want to program a clock like the one on a computer that runs in military time and will automatically adjust to whatever the time is set on the computer it's played on, What's an easy way to accomplish this? Another thing besides this is a timer that keeps track of total play time (not just...
  13. RyanC

    Legacy GM Unlocking a Feature every 10 minutes

    Hi All, I've been wondering how to do this for some time now and thought I'd ask for help. I'm looking to unlock a share feature for user's every 10 minutes to prevent users from stacking up too many gems. Originally I thought of this: if abs(saved_minute - current_minute) > 10 { unlock =...
Top