Hello I am new to this forum though i have read over and liked this site very much.
That said, I need help with a script I am working on.
I am trying to make a new menu where the player can access a player card
where he or she can look at the gold and time played in one popup menu from
the orginal menu, something like this:
Party
item
Player Name
save
exit
Along those lines.
When the player clicks on "Player Name" i would like a new window to appear with:
"Name / Player Name"
"Gold / Player Gold"
"Time/ Player Time"
I have managed everything up to "Name / Player Name" but i cannot for the life of me figure out how to
put the gold and time played in the same box.
Any help or suggestions would be grateful.
Thanks in advance.
The amount of gold the party has can be accessed with $game_party.gold
As for time, it is calculated with a bit of mathematics. The way VX does it might be a little confusing, but Yanfly had this code to work it out:
def game_time
@gametime = Graphics.frame_count / Graphics.frame_rate
hours = @gametime / 3600
minutes = @gametime / 60 % 60
seconds = @gametime % 60
result = sprintf("%d:%02d:%02d", hours, minutes, seconds)
return result
end
Which should work to get the game time, you'll then need to add some code to draw the result.
I'm not sure what difference is needed for RMXP if you're using that. I only work with VX.
If indeed that was the info you wanted.