It looks like we are all trying to do the same thing
. I'm trying to make a mission where guns are illegal in town, and the police will fire at you if you have one out.
Nobby: Unfortunately, there is no way for the player to change his "behaviour". It will always by default be "aware", no matter what the player is doing. It will only change if the player's AI leader says something ("at ease"), or if the mission designer types something like: player setbehaviour "safe". But if you want to see for yourself, the command you need is:
behaviour
unitThis returns a string, such as "AWARE","SAFE","COMBAT", etc.
BronzeEagle: I'm sorry, but there is not "M16 in hand" eventhandler, so you can't do that. The closest thing to that is "fired", which detects when a unit has fired a weapon (but I know that's not what we want).
A sort of 'workaround' for this problem could be to have the player be unarmed, and give him an action that says "pull gun", or sumthin like that. Using the action would add a weapon to the player's inventory, and also make him no longer a captive. Of course, there are problems with this way (the player can't use whatever gun he wants; the gun would start with an empty clip; etc), but until something better is devised, it might be the only way to do it.
I'll let you know if I find a better way around this problem.