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
55
Reaction score
30
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,532
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 Profile Posts

People laughed at me when I said that Activision Blizzard would get bought up by another company if they didn't fire their execs. Now their value has dipped so much Microsoft is willing to buy the company, likely followed by some heavy terminations if they want to purify the current toxic image of Activision Blizzard.
Pro tip: don't be this person.1642536788532.png
ok hear me out here: if the only way my brain can describe things is like with colors is this normal? Like I've described a smell as "dark green and fuzzy" and a taste as "dark blue" like is this a normal thing that happens to people or am I just going insane?? o.0
I'm sitting here, programming, when suddenly, in the distance, I hear a deep booming shout, "Dovahkiin". In an instant, my mind and body is pulling me away, my fingers twitch and notepad++, almost by itself, turns off. The Steam starts to rise and a big green play button appers and I am teleported to Skyrim, because, I am, the Dragonborn! 200 hours played last three weeks, omg o_O

Forum statistics

Threads
118,487
Messages
1,116,311
Members
155,473
Latest member
bomjamboree
Top