What is a formula where the value grows until a certain number and then stops?

Status
Not open for further replies.

firestalker

Veteran
Veteran
Joined
Nov 18, 2015
Messages
345
Reaction score
40
First Language
English
Primarily Uses
RMMV
I need a formula where the value continues to grow until it reaches a certain number and then stops growing completely.

Something like:
Stop at 25
5 + 5 = 10
10 + 5 = 15
15 + 5 = 20
20 + 5 = 25
Formula stops computing
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,770
Reaction score
12,205
First Language
English
Primarily Uses
RMMV
Are you using a variable?

$gameVariables.setValue(x, Math.min($gameVariables.value(x) + 5, 25))
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,582
Reaction score
3,775
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

I hope you all are keeping safe. <3 If you need a shoulder or an ear, I have two of both and am more than willing to listen & support you! Times are weird.
My dad, super frustrated by seclusion, asking me how I live like this. I shrug. "It helps to not like what is outside."
Apparently it's not just people who are hit by corona virus. My phone has set itself to English language on its own. Not that I'm complaining... :D
I got a new computer and can't find my product activation key for MV, what do I do ;-;
buinguyenhoangtho wrote on fizzly's profile.
Hello @fizzly, i would like to use your asset/ resource for my project ( is maybe commercial ). May i have your permission? Thanks you !

Forum statistics

Threads
95,443
Messages
929,168
Members
125,681
Latest member
Diputus
Top