Joined
Nov 6, 2019
Messages
2
Reaction score
2
First Language
Italian
Primarily Uses
RMMV
First of all, I'm new here, so I'm sorry if I'm in the wrong section of the forum!

I'm currently making my very first game and I wanted to do multiple endings. I thought about setting variables that increase with specific dialogue choices so that the highest variable will determine which ending the player will get. How can I do this with more than two variables? How can I make RMMV determine which variable is the highest?
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
56
Reaction score
31
First Language
Romanian
Primarily Uses
RMMV
There is a way that dose not require js, only what you have in rpgmaker, I belive the following will help you in your case, you want max of all values right? Then make 2 more variables, one called VarMax and one called EndingID, place the first value from your first variable that you want to compare in it and in the EndingID place the id of that variable in it. Once that is done you will need a number of ifs(conditionals) that sound like the following if VarB>VarMax then VarMax=VarB, EndingID=ID of VarB(you can see the id next to the name of the var) End; If VarC>VarMax then VarMax=VarC, EndingID= ID of VarC and so on and so forth, watch out for equals(it will work but it will always pick the last one). And ther you have it in EndingID you have the number of the ending that you want your player to have.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
525
Reaction score
1,538
First Language
Indonesia
Primarily Uses
RMMV
upload_2019-11-6_18-23-57.png

Var Max = Checker of which of these variable have greater value
Var A = Determine Ending 1
Var B = Determine Ending 2
Var C = Determine Ending 3
Var D = Determine Ending 4
Ending = Variable which decide the ending

The order of the condition decide the priority in case the maximum variable have equal value. If the maximum value is both Var B and Var C, then the ending determind by Var B will be choosen since its condition appear first.
 

Latest Threads

Latest Posts

Latest Profile Posts

Brace yourself. We are approaching that time of the year again.
I once said, "I definitely want to be done with this project before my 40th birthday." At the time, I was about 50% done with the project.

With under 365 days to go now, I'm about ... 30% done.

What a sweet, innocent fool I was.
can anyone tell me how to edit my pfp it isn't obvious and I'm new here
Damn, took a chance on a paid MV plugin working with MZ (FOSSIL) but didn't work :p Been lucky up until now so I got cocky!
Going to be streaming more RM game dev in about 20 minutes or so...

Forum statistics

Threads
129,989
Messages
1,206,792
Members
171,227
Latest member
snokojin
Top