Hi again! I’m looking for some constructive critique on how to clean this code up/ if there is maybe a simpler way to achieve what I am looking for?
Here’s the mess of code right now:
… And here’s my thinking: The input is the “down” key, or “S”. Before being inputted, it is run through a test to make sure 1. The PC is within range and 2. The other, prior dialogue options have already been run. The randomizer chooses a number and puts it through three filters, set to 1-3. Depending on which number it has chosen, that filter activates a switch which allows the input (“S” key) through to prompt each line of dialogue. After the dialogue is done, a second filter starts the randomizer back up will simultaneously setting the first filter to “4”, which turns that line of dialogue “off” since the randomizer is only 1-3. Finally, a collision with the correct item needed to progress (In this case, a slime jar) turns the entire system off in order to allow the “Success” dialogue.
So, can I clean this up at all?? Is there a simpler way?? Am I overthinking this???