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
42
Reaction score
23
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
480
Reaction score
1,467
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.
 

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

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top