Lock
Revision as of 10:45, 13 December 2010 by imported>Bruneauinfo (Altered the example formatting to show that this function can apply to an Referenced Object.)
Syntax:
ObjectRef.Lock lockLevel lockAsOwner (optional)
Example:
Lock 30 Lock 75 1 MySpecialDoorRef.Lock 100
Locks the door or container with the specified lock level. If you use the optional LockAsOwner flag, the door will be treated as if the owner locked it, for purposes of the AI determining whether entering the cell behind the door is treated as trespassing or not. With LockAsOwner = 0, whether the cell is treated as public or private is unaffected.
Although you can enter any value for the locklevel, there are specific values that are associated with each lock level. Each has a game setting that controls the associated value.
Lock Level | Value | Game Setting |
---|---|---|
Very Easy | 7 | iLockLevelMaxVeryEasy |
Easy | 20 | iLockLevelMaxEasy |
Average | 40 | iLockLevelMaxAverage |
Hard | 80 | iLockLevelMaxHard |
Very Hard | 99 | iLockLevelMaxVeryHard |
Needs a key | 100 |