Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Mathematics Game
- Original author: reckus
- Original date: January 13, 2017
- Source thread: https://forums.rpgmakerweb.com/threads/mathematics-game.73548/
- Source forum path: Game Development Engines > Legacy Engine Support > RPG Maker MV Support
Summary
Hello I'm currently making a Mathematic game for kids I'm making a basic four types of operation : multiply , addition , division and subtraction The rest are done but I'm currently stuck on division operation part
Archived First Post
Hello
I'm currently making a Mathematic game for kids
I'm making a basic four types of operation : multiply , addition , division and subtraction
The rest are done but I'm currently stuck on division operation part
If I do normally , the answer is still correct , its just that there are no decimal point
for example 3 / 2 = 1
But it should be 1.5
What I'm trying to achieve is :
A variable that holds one decimal point
A way for player to answer the question in one decimal point too.
How do I achieve that?
Thank you very much!
#EDIT
Succesfully stored value into variable
Here's the code if someone interested
I used the Control Variable event to generate random numbers
var x = $gameVariables.value(1); // get value from variable that stores num 1
var y = $gameVariables.value(2); // get value from variable that stores num 1
var z = (x /y).toFixed(1); // Divide operation and toFixed(how_many_decimal)
$gameVariables.setValue(4, z); // Assign the value into variable
So now all is left is how to let player answer in decimal too
Protected download
I'm currently making a Mathematic game for kids
I'm making a basic four types of operation : multiply , addition , division and subtraction
The rest are done but I'm currently stuck on division operation part
If I do normally , the answer is still correct , its just that there are no decimal point
for example 3 / 2 = 1
But it should be 1.5
What I'm trying to achieve is :
A variable that holds one decimal point
A way for player to answer the question in one decimal point too.
How do I achieve that?
Thank you very much!
#EDIT
Succesfully stored value into variable
Here's the code if someone interested
I used the Control Variable event to generate random numbers
var x = $gameVariables.value(1); // get value from variable that stores num 1
var y = $gameVariables.value(2); // get value from variable that stores num 1
var z = (x /y).toFixed(1); // Divide operation and toFixed(how_many_decimal)
$gameVariables.setValue(4, z); // Assign the value into variable
So now all is left is how to let player answer in decimal too
Protected download
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...
