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,815
Reaction score
12,228
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,609
Reaction score
3,786
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

Hope y'all are staying healthy, safe and informed. Maybe pick up a new hobby or skill while you're at it.
Wanted to post a video of location i've finished but it doesn't work...
The game jam has done a lot of good in actually kicking my butt into action. I've even gotten over my crippling hatred of mapping thanks to it! :LZSexcite:

(Okay, there's also schoolwork forcing me to get on the computer, but I like to give credit where credit is due.)
Decided to start working on my second biome/area...


I'm sure I'll end up hating and changing things a whole lot over the next week. :LZSexcite:
I feel bad sometimes around others, I hate, and I mean HATE being touched, and I know they don't know I hate it so much

Forum statistics

Threads
95,656
Messages
930,805
Members
125,988
Latest member
jiive
Top