edited May 2015 in ORK Support
I'm trying to implement time-based gameplay in my RPG, meaning that the game ends abruptly after, say, 24 hours of gameplay regardless of the player's actions (forcing the player to act quickly and responsibly).

GiL, what are the best ways to do this within the framework? Thank you.
  • edited May 2015
    Best way I can think of is having a float variable, for example called 'time'. create an event that sets the float to the desired amount of time you want to have i.e. '24'/ in the event make it so that it subtracts from the 'time' variable after a 'wait' command. Create a 'check variable' step, have it so it checks to see if 'time' equal to '0' or if it is 'less' than '1'. If it is then have it either call for game over or go to another scene/event (however you handle game over'. If it fails have it loop back to where it needs to continue i.e. the wait or the variable subtraction. Make a 'global event' and have it set to 'auto' so it continues non-stop, at least until it reaches 0.

    (Bit of a cluster because I'm in a hurry. Hopefully you can make sense of it)
    Post edited by Loopdaloop on
  • You can find an example for a custom time system inside the game in this gameplay tutorial.

    If it's just checking for the time the player has been playing, you can e.g. store the time (in seconds) until game over into a float variable and check that against the Game Time value type. If the game time exceeds the defined time, you can use the Game Over step to call game over.
    Create a game event that does that and use it e.g. in a global event (World > Global Event) with Auto event type and e.g. a check timeout of 60 to check every minute.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you for both answers! I'll get back to this thread if I have further problems with this.
Sign In or Register to comment.