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,781
Reaction score
12,207
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,589
Reaction score
3,780
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

Ami
4 days im not using my laptop to waiting someone to reinstall (sigh)
Stream will be live shortly with some Donkey Kong 64! Feel free to drop by!
Working on a test Boss for the new No Travel Game Jam
- Name Plugin by Moghunter -
Free RPG Maker Ready Charging Up Animation

Enjoy -No Credit Needed But Appreciated -
Download it at https://lvgames.itch.io/free-charging-up-pixel-animation-fx-rpg-maker-ready
:/ .... so, thought I’d go to the park to sit in the cool breeze and get out of the house a little. Nope, guess that’s quarantined too. Ok...

Forum statistics

Threads
95,490
Messages
929,548
Members
125,740
Latest member
Smeinela
Top