Only making 2 actors active at a time
lucybranthwaite
Member Posts: 6
Hello,
I'm making a match game so when two cards are clicked and they match they are destroyed but I only want the player to be able to click two cards at a time, I've tried to make a controller actor who keeps track of how many clicks there has been but I'm not sure how to make an object not clickable.
So I want all 16 cards to be clickable until the player has clicked on two cards and then for 3 seconds the player can't click anything and then when the 3 seconds is over they can click on the cards again
any ideas?
thank you!
Comments
You can add another condition to the existing rule you have so if your clicks attribute is < 2 you can click it.
For example: On your card, the rule would look like this.
When touch is pressed
When game.clicks < 2
Change game.clicks to game.clicks+1
Then just make sure to reset your game.clicks attribute back to 0 after the 3 seconds so they can click again.
Fortuna Infortuna Forti Una
would this make it so the player was unable to click for 3 seconds after clicking twice?
Wont be able to click any until you set the game.clicks back to 0. So either a timer or however else you got it set up.
Fortuna Infortuna Forti Una
This is just a mini game and part of a larger series of games so if i restart the game it will go back to the start. Also if i restart the scene will it forget the matches which have already been made?
If you reset scene, you have to manually reset the attribute back to default.
If you change scene, you have to manually reset the attribute back to default.
If you reset game, you don't have to do anything.
Fortuna Infortuna Forti Una