Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.
Basically. If you want an action to happen when two conditions are met, you need some kind of check to see if those conditions are met. Usually this is done in If statements. You can use more advanced things like switches or for loops, but if statements will work most of the time and are easiest for beginners to learn.