I need help fixing a bug for my game where a player can click the 2 dialog buttons I made in the beginning of game (each button adds player to 1 team). If the player clicks both dialog buttons before they are disabled, how would I make it so the player doesn't get allied to the 2 teams?
Do you mean set an if-then statement that a button has been clicked? Because I couldn't find a variable that does that and I still don't know how to do it. Can you give more info?
Use a boolean type.
Say there's button X and button Y.
When X or Y is clicked, create a condition that checks to see that the boolean value is false. When the button is clicked, simply make it true.
Only hide the dialog AFTER the player picks his team. SO he hits one button, and then POOF they both go away, preventing him from being on 2 teams. What is the problem with that?
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
To post a comment, please login or register a new account.
I need help fixing a bug for my game where a player can click the 2 dialog buttons I made in the beginning of game (each button adds player to 1 team). If the player clicks both dialog buttons before they are disabled, how would I make it so the player doesn't get allied to the 2 teams?
Just hide the 2nd button when he presses the 1st button, or vise versa. That way he can't press the other one. Use "show/hide dialog item".
@zeldarules28: Go
That didn't work out because it disables BOTH dialog items but the player still gets a chance to be on both teams.
@Vietman: Go
Set a variable saying that a button has been clicked, and don't let a click happen if the variable has been set. I had this problem as well.
EDIT: You can't rely on the UI elements, but you can rely on variables.
@Vexal: Go
Do you mean set an if-then statement that a button has been clicked? Because I couldn't find a variable that does that and I still don't know how to do it. Can you give more info?
Only hide the dialog AFTER the player picks his team. SO he hits one button, and then POOF they both go away, preventing him from being on 2 teams. What is the problem with that?