RPG Maker Forums

I searched for this tutorial and I couldn't find it, so I'm posting it myself. This isn't really that advanced and it's not a plugin, but it's a fun thing for your game. I was reminded earlier last night that we aren't supposed to grave dig old threads anyway, so here is the same thing that's probably already been posted before (maybe not, idk. did I beat you to it?) in fresh thread for your safe commenting.


It's been posted before that you can call the text box by script with $gameMessage.add(); I just learned this, this morning working on a game.


This is what I used it for.


One thing about javascript is that it can read the client side system clock. This is a well known fact from web design. So here's an example of the time and date with your message.





PHP:
var d = new Date();
var h = d.getHours();
var p = h < 12 ? "AM" : "PM";
if(p==="PM") h-=12;
if(h===0)h=12;
var m = d.getMinutes();
if(m<10) m = "0"+m;
var mo = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][d.getMonth()];
$gameMessage.add("What time is it?\\!\nThe time is "+h+":"+m+" "+p+", and the date is "+mo+" "+d.getDate()+" "+d.getFullYear()+", LOL!");

Called by event script, also the escaped slash bang is an MV enter pause; the slash n is a new line. Basic, but fun stuff.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top