Okay don’t laugh, this is my first attempt at defining a function all by myself and surprise it don’t work!
I’m sure you can see from below what I’m trying to create.
stop();
daytime = function () {
myDate = new Date();
var h = myDate.getHours();
if (h > 0 < 11) welcome = morning;
if (h > 11 < 17) welcome = afternoon;
if (h > 17 < 23) welcome = evening;
}
statement = (“good” + welcome + “!”);
Basically dependent on the hour the text displays a relevent welcome message. Once I cracked this I was going to use the same code to alter an animaton of a scene to reflect the time of day.
Any help, as usual appreciated.
Mhunki