On the contrary, please accept my apologies for not writing a clearer answer.
To solve your problem - which is very solvable - you need to learn about a bunch of things. Once you understand the things then it will all be very easy. The things are:-
- triggers which are type "switch". There is a specific tute in the Ed Depot, plus good coverage in the general trigger tutes and lots of helpful posts in the forum - use the forum search function (button near the top of this page). They are generally known as switch triggers.
- There is a tute in the Editors Depot called "How to use objectives and init.sqs" (or similar) by somebody called snYpir. All his tutes are excellent and you could do worse than read them all, but have a go at that one because it's relevant to your question.
- there is a command called "eventhandler". It's a bit more advanced than the other stuff I've mentioned so leave it till last. However, it's not difficult to use and will suit your problem very well. By slightly softening your requirements you can probably do without the eventhandler stuff, but you do need to know snYpir's tute and the switch trigger stuff so go away and learn that. Look at the official command reference for more info, and search the FAQ and the forum.
If there is anything you don't understand, or if you get stuck, come back here and ask again.