.Capx file: *REMOVED*
Context: I am making a basic game to help some friends playtest a board game they are making. The issue I am having is during a phase of the game where players draft their dice, the game is supposed to alternate between each player after a selection is made. Assuming the other player has enough points to draft at least one dice, the turn is supposed to shift after a selection is made.
The bug: The first player to pick is randomly chosen at the start of the layer, if player 2 is chosen first the event works as intended. But when it becomes player 1 turn, the turn will not shift until player 1 has reached the maximum point value. After player 1 has reached the maximum point value, the turn shifts to player 2 and when player 2 reaches maximum point value the dialog pops up prompting the start of the new layer as is intended.
Relevant lines: Line 19 starts the player 1 events, line 38 starts the player 2 events.
1. Check PlayerSelecting variable for who's turn it is (1 is player one, 2 is player two).
2. Check if value of dice is <= DraftMode maximum value (15 for now).
3. Determine if the selected dice is a weapon or not, if it is then make sure the player does not already have a weapon.
4. Move correct dice to player area, determine the LowestDice value from the remaining dice.
5. Check if LowestDice value is <= Maximum value - Opponents current value total. If so pass the turn.
6. Else, if LowestDice is > Maximum value - your current value total, start the next game layer.