Storeing Individual Digits from a Int Variable...

PixelHeart

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,793
Reaction score
1,977
First Language
English
Primarily Uses
Other
So, after hours of mathing I made this event work the way I wanted... it stores the indiviual digits of a number in four variables. My intentions for this are to get the individual stats of the players characters to display on a custom status screen.... just cuz. As I stated, the event seems to be working as intended, but my mind isint well suited to programing and I was wondering if anyone knew a better way to go about this? Thank you for any advice :) !

1594328120157.png
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,462
Reaction score
390
First Language
German
Primarily Uses
RMMV
I copied the Eventcode from RMMV as Text, one possible way to make it could look like this:
Code:
◆Control Variables:#0061..0064 = HP of Harold
◆Comment:Ones
◆Control Variables:#0061 var61 %= 10
◆Comment:---------------------------------------
◆Control Variables:#0062 var62 %= 100
◆Control Variables:#0063 var63 %= 1000
◆Control Variables:#0064 var64 %= 10000
◆Comment:Thousands
◆Control Variables:#0064 var64 -= var63
◆Control Variables:#0064 var64 /= 1000
◆Comment:Hundrets
◆Control Variables:#0063 var63 -= var62
◆Control Variables:#0063 var63 /= 100
◆Comment:Tens
◆Control Variables:#0062 var62 -= var61
◆Control Variables:#0062 var62 /= 10
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,355
Reaction score
1,510
First Language
English
Primarily Uses
RMMV
1594387982178.png

I did it a similar way to Bex.

1594388007250.png

(using MV but the principle for the setup is the same)
 
  • Like
Reactions: Bex

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Got inspired and started writing a simple tower defence battle system last night :o
Good news! I have located an amazing 3D website called SketchFab that has rotatable renderings of famous statues!
Picked up a physical copy of Megadimension Neptunia VII for the PS4 today. It's pretty good. I'm having a lot of fun with it.
The only upside of this remote semester was the plenty of funny photoshop material those facecams provided. Not that I would do that. Ever.

Forum statistics

Threads
100,516
Messages
976,711
Members
132,080
Latest member
nwr
Top