Setting a Variable off of Many Other Variables

Okay, I kind of get it :sweat_smile: but I still don’t see what the final equation/code would be/look like.

And I can see how this could be faster but ME having to do math would make this a multi-day affair LOL , it’s been 9 years since I had a math class. I’ll look over this a bit longer and see if I’m able to do it!

1 Like

It’s just what I shared before. I included the calculations. The only math you have to do is subtract up to 12 from a number.

But, beef is 1? So, 1 through 12 are beef dishes.
Then, noodles is 1? So, 10 through 12 are beef-noodle dishes. (whatever is 2 is would be 7 through 9)
Vegetables is 1? That means 12 is the beef-noodle-vegetable dish.
Dairy is 2? That means 11 is the beef-noodle-dairy dish.
(Note: These are in reverse because the code subtracts).

Does that help? (ETA: You could probably make a table…)

So in this, you’d swap out the letters with the dishes (the 12th being beef-noodle-vegetable):

@set sig_dish "@{(sig_dish_num) aa|ab|ac|ad|ae|af|beef-bread-spices|beef-bread-dairy|beef-bread-vegetables|beef-noodle-spices|beef-noodle-dairy|beef-noodle-vegetable|am|an|ao|ap|aq|ar|as|at|au|av|aw|ax|ay|az|ba|bb|bc|bd|be|bf|bg|bh|bi|bj|bk|bl|bm|bn|bo|bp|bq|br|bs|bt|bu|bv}"

And so on.

I think I’m slooowly starting to get it, especially with the helps of your edits!

1 Like

@LisHz @TonyG

It took me like 2 hours but I ended up implementing the recipes using gosub_scene! I think this method is the best because I’ll be able to use the recipes scene later for many different recipe/ingredient related things.

Thank y’all both so much for your help

3 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.