What's up pal?!
Just to settle my own curiosity; are you truly building a project in Arma or did you mean to post this in Arma 2? There is no difference to be honest, I was just wondering if there was still activity in Arma.
Anyhow, the answers....
To have an individual unit activate a trigger exclusively, you must group him to the trigger. Select F2(GROUPS)>>left click on the trigger and hold>> slide mouse over individual unit and release button. That makes it so that only that unit will activate the trigger.
SBG_ActionVariable = player addaction ["Activate Switch","toggleswitch.sqs"]
Assigning a global variable to an addaction will allow you to access that action anywhere within the mission, whether it's another trigger, waypoint, script or even the init of a spawned object.
The code above demonstrates the assignment of the global variable "SBG_ActionVariable" to the addaction that follows. "player" of course, is the universal reserved global variable for the player unit, so you will never need to assign another global variable to the player unit; just use "player". The rest of that code can be identified by reading the command for it in the COMREF
To remove that action from anywhere in the mission you utilize the removeaction
command. In this case, it would be...
player RemoveAction SBG_ActionVariable
It's important to note that when you begin to use global variables, you have the potential of interfering with global variables used in the game code itself or addons. To avoid this headache of conflict, Sign up for a free tag here
and prefix it to all of your Global variables from this point forward.
Now, if you would like to use this in a trigger, simply insert the AddAction into the OnActivation field of the trigger.
Then insert the RemoveAction into the Deactivation field.
If you want the trigger to always give the option to activate the action without allowing the player to activate it more than once, you will have to assign a global variable the the trigger itself and then delete it once the script is executed.
Or you could just add the action to an object and remove the action or delete the object within the script.
It would also be worth your time to read some tutorials, sift through the editing boards and play other user made missions to see how they have done things.
Happy editing buddy.