Difference between revisions of "Lock"

476 bytes added ,  17:52, 31 August 2011
used Function template to standardize syntax
imported>JOG
(See Also)
imported>DragoonWraith
(used Function template to standardize syntax)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Syntax:'''
{{Function
Lock lockLevel ''lockAsOwner (optional)''
  | origin = CS1
'''Example:'''
  | summary =
Lock 30
Lock 75 1
 
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.  
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.
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.


{|border="1" cellpadding="5" cellspacing="0"
{{{!}} border="1" cellpadding="5" cellspacing="0"
|-
! style="background:#efefef;" {{!}} Lock Level !! style="background:#efefef;" {{!}} Value !! style="background:#efefef;" {{!}} Game Setting
! style="background:#efefef;" colspan=1  | Lock Level
{{!-}}
! style="background:#efefef;" | Value
{{!}} Very Easy {{!!}} 7 {{!!}} [[iLockLevelMaxVeryEasy]]
! style="background:#efefef;" | Game Setting
{{!-}}
|-
{{!}} Easy {{!!}} 20 {{!!}} [[iLockLevelMaxEasy]]
|Very Easy
{{!-}}
|7
{{!}} Average {{!!}} 40 {{!!}} [[iLockLevelMaxAverage]]
|[[iLockLevelMaxVeryEasy]]
{{!-}}
|-
{{!}} Hard {{!!}} 80 {{!!}} [[iLockLevelMaxHard]]
|Easy
{{!-}}
|20
{{!}} Very Hard {{!!}} 99 {{!!}} [[iLockLevelMaxVeryHard]]
||[[iLockLevelMaxEasy]]
{{!-}}
|-
{{!}} Needs a key {{!!}} 100 {{!!}}
|Average
{{!}}}
|40
  | referenceType = container
|[[iLockLevelMaxAverage]]
  | referenceOpt = 1
|-
  | arguments = {{FunctionArgument
|Hard
    | name = lockLevel
|80
    | type = short
|[[iLockLevelMaxHard]]
  }}{{FunctionArgument
|-
    | name = lockAsOwner
|Very Hard
    | type = bool
|99
    | optional = 1
|[[iLockLevelMaxVeryHard]]
  }}
|-
  | example =
|Needs a key
<pre>Lock 30
|100
Lock 75 1
|
MySpecialDoorRef.Lock 100</pre>
|-
}}
|}
 


==See Also==  
==See Also==  
Line 51: Line 46:


[[Category: Functions]]
[[Category: Functions]]
[[Category:Functions (CS)]]
[[Category: Functions (CS 1.0)]]
[[Category: Miscellaneous Functions]]
[[Category: Miscellaneous Functions]]
[[Category: Miscellaneous Functions (CS 1.0)]]