RPG Maker Forums

I am having a script issue, I believe this is the place to post questions like this:


I am using Fomar0153's More Choices script. It is simple and easy to understand and edit. My goal is to make a conditional choice dialogue such as 


Choices:


    Do nothing


    Break Door if variable > x


    Pick Lock if variable == y


    Knock on the door


Fomar0153's script is adequate to do this (which I am thankful for) but because each choice is added onto a stack via pushing if a condition is met the choice is never pushed onto the stack.


$game_message.choices.push("Choice_1")
$game_message.choices.push("Choice_2") if $game_switches[1]
$game_message.choices.push("Choice_3")
$game_message.choices.push("Choice_4")
$game_message.choices.push("Choice_5")


Choice 2 is only added to the stack if $game_switches[1] is true. HOWEVER if it is NOT added to the stack, Choice 3 BECOMES Choice 2 (because it is the 2nd choice in the stack). When using index (or the option the player chooses) in a conditional branch after the choice dialogue all the options slide based on what was added (or not added) to the stack.


My Question is: How do I have conditional choices without having the stack slide like this? Is there some way someone could show me? I thought if I had another variable set to how many choices were given and then compared to how many choices were removed via the conditions I could find a value that could still be used for conditional branches, but sadly I could not figure this out.


I know it is popular to suggest "use this mega script that does all these awesome things" but honestly I prefer the simplicity of this script. If it is possible, I would like to continue using this script or something similar without needing to adopt a bigger and more complicated script. 


Thank you very much for your help.


(edit, linked to script pastebin)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top