- Joined
- Jun 30, 2014
- Messages
- 56
- Reaction score
- 12
- First Language
- English
- Primarily Uses
I'm making a timing-based baseball minigame. I have a common event loop that cycles through all of the hits you can get (single, double, out, etc) and it stops on the current result when you hit enter. I have it set up to use different wait times for each result so that certain outcomes are harder to get (for example, Out waits for 15 frames while Home Run only appears for 5 frames).
I was hoping to add an extra layer of complexity by giving each batter different stats. If you have a guy who is better at hitting home runs, then while he's batting the Wait command should wait longer on the Home Run space and make it more likely for you to end up with that outcome. I could come up with some kind of formula to calculate the exact wait time for each result, but since Wait only lets you input a number, I'm not sure how I would go about applying that variable.
Does anyone have any ideas on the best way to tell the Wait command to use a variable as its number? Right now my best solution is having a separate conditional branch for each batter (if Batter A switch is on, wait for 5 frames, if Batter B switch is on, wait for 10 frames, etc) For two teams of 9 players though, that would make a TON of conditional branches, especially if I wanted to later incorporate the pitcher's stats into the equation as well. There's gotta be a better way to do it... right?
I was hoping to add an extra layer of complexity by giving each batter different stats. If you have a guy who is better at hitting home runs, then while he's batting the Wait command should wait longer on the Home Run space and make it more likely for you to end up with that outcome. I could come up with some kind of formula to calculate the exact wait time for each result, but since Wait only lets you input a number, I'm not sure how I would go about applying that variable.
Does anyone have any ideas on the best way to tell the Wait command to use a variable as its number? Right now my best solution is having a separate conditional branch for each batter (if Batter A switch is on, wait for 5 frames, if Batter B switch is on, wait for 10 frames, etc) For two teams of 9 players though, that would make a TON of conditional branches, especially if I wanted to later incorporate the pitcher's stats into the equation as well. There's gotta be a better way to do it... right?
Last edited by a moderator:
