Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

I need help with Near's old Time system

Okay, I found a post on another site explaining how to convert the hours or minutes into a variable:

$game_variables[1]=$game_time.hours (or minutes)

The problem is that that solution only works for hours and minutes. I've been trying to figure out how to convert days, months, and years into variables, but I can't figure it out. If I use the code:

$game_variables[1]=$game_time.timess

Variable one then contains the date, year, and time of day altogether,
For instance, today it says:

Sat Oct 20 15:36:47 Eastern Daylight Time 2007.

But I can't figure out how to use that, since not all of it is in number format, and it's all clumped together.
What I need is to somehow convert each piece of information into seperate variables.
If anyone could help me figure it out I would really appreciate that.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top