This tutorial describes a way of allowing lockpicking to have an object teleported nearby, the sight of which will make an AI remove any metaproperty that is being used to make it friendly (e.g. M-AlertCapZero or M-Front Gate Guard).
Before you begin, install a reasonably recent version of Telliamed’s custom scripts. For this tutorial, you need to have tnhScript.osm in your Thief folder, and you need to load it into your mission (script_load tnhScript).
Now, when lockpicking starts, the nearby TeleportTrap will be activated. When lockpicking ends, the blueroom TeleportTrap will be activated.
There’s one more case to consider. PickEnd will not be sent if the player looks away from the door while still using the lockpick. This can be easily fixed:
For each AI that is likely to see you picking the lock, create an AIWatchObj link from the AI to the Marker, with the following link Data:
Watch Kind: | Self Entry |
Priority: | Very High |
Trigger: Radius: | Your choice. 8 or 10 should be good values. |
Height: | Your choice again. 8 is okay unless there is a lot of elevation in the area (e.g. balconies). |
… | |
Line Requirement: | Line of Sight (None might be better) |
… | |
Response Step 1: | Add/Remove Metaproperty |
Argument 1: | Remove |
Argument 2: | M-AlertCapZero (or M-Front Gate Guard if that’s what you used) |
Feel free to experiment with other values, and of course you can add other actions besides removing the metaproperty.