I know of: Browser.ExecJS("Date()")
I need to know how to extract it to individual variables or to compare it to a specific time, date and day of the week. I don't think the year matters, but would like to know anyway.
I would like to keep it system time and as simple as possible.
I tried plugins, but they all seem to be for C2 runtime. They were not showing up in my project and I couldn't figure out why. I made a new project and placed it in c2 runtime and then saw them available.
I would like my project aware of time so characters can be different places at different times. I also would like to built it so in-game events can start on their own depending on what date/day it is.
Set Value strTime mid((Browser.ExecJS("Date()")),17,8)
Also, this article had an interesting take on elapsed time. if that helps!
Edit: Its not pretty, but you can then use a function to break it down into what you want. Ie: Pass
Set Value strHour mid((Browser.ExecJS("Date()")),17,2)
Set Value strMinute mid((Browser.ExecJS("Date()")),20,2) or preferably return it once and work on that variable instead of multiple browser calls.
I have seen the UTC Plugin, the download page said it isn't made for c3 runtime yet. I downloaded the example you gave to test and it is only in C2 runtime.
I don't want to remake objects in c2 runtime because some c3 runtime things are not compatible for c2 runtime.
I am going to have to lookup your example to understand what mid(text, index, count) does and how to use it. Seems like you pointed me into a direction.
I will post later to explain it to others or ask more questions if needed.
Develop games in your browser. Powerful, performant & highly capable.
Thank you for showing me Mid()
It is very easy.
mid(text, index, count)
Text is the text you are displaying.
index is the starting position of the text you want.
count is how many letters/numbers you want displayed.
index=0 and count = 3
will result as 'App'
index=4 and count=2
will result as 'e1'
You have to set variable as String or it may not work correctly.
I did some testing and here is some extra info, for those that are learning this.