2 Player Switch Turns Help
michaelpaulmartinez
Member Posts: 12
I am making an optional 2Player matching card game. I already have a boolean attribute called "Activated card" that identifies when two cards have been flipped. I have 24 cards and I have a score system that counts the total pairs. I made an Integer attribute called Switch turn that switches between each player if "activated card" is true and "score" is 0, Switch attribute = (switch+1)%2, makes it switch fine. The trouble is keeping it on the player when he gets a correct pair and stop it from switching. I have tried when score = 1 to stop the switch. And then set the score back to 0 to start the cycle over again. But for some reason it keeps on switching. Any ideas on how you would go about solving this would help me greatly. Thanks.
This discussion has been closed.
Comments
Most likely, you need to remove the conditions from those rules so that the switch attribute is not a condition. So if you have a boolean such as activated card that gets set to true when the player's turn is over (is that case?) then you would do Change Attribute game.switch to (game.switch+1)%2 and Change Attribute game.activated card to false.
If that doesn't make sense, post a screenshot of your rules and I'll help you further.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User