Doors Lua API: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 48: Line 48:


=== AssignKeyToCharacter ===
=== AssignKeyToCharacter ===
<syntaxhighlight source lang="lua">Doors.AssignKeyToCharacter(keyName, characterTable)</syntaxhighlight>
<syntaxhighlight source lang="lua">Doors.AssignKeyToCharacter(keyName, character)</syntaxhighlight>
'''Expected parameter types'''
'''Expected parameter types'''
{| class="wikitable"
{| class="wikitable"
Line 56: Line 56:
| keyName || string
| keyName || string
|-
|-
| characterTable || Lua Table
| character || Lua Type
|}
|}
'''Description''': Adds a key to a characters inventory and sets it as the characters current NFC data
'''Description''': Adds a key to a characters inventory and sets it as the characters current NFC data
Line 62: Line 62:
'''Returns''': Nothing
'''Returns''': Nothing


'''Notes''': The character parameter can be either a character table, as set out in your mission script, or the internal name of the character to be assigned the key




This file is auto generated, please don't edit manually!
This file is auto generated, please don't edit manually!


'''Docs last hacked together on''': 06/09/2018 14:53
'''Docs last hacked together on''': 04/02/2019 17:02
[[Category:Modding]][[Category:LuaAPI]]
[[Category:Modding]][[Category:LuaAPI]]

Revision as of 17:03, 4 February 2019

Doors

Description

API to control the logic of doors in the mission

Functions

SetZoneKeys

Doors.SetZoneKeys(zoneName, keyNames)

Expected parameter types

Name Type
zoneName string
keyNames Lua Table

Description: Sets a key as unlocking a specific zone

Returns: Nothing

SetNetwork

Doors.SetNetwork(networkTable)

Expected parameter types

Name Type
networkTable Lua Table

Description: Sets the name of the network for the door system to use

Returns: Nothing

SetKeyOnDevice

Doors.SetKeyOnDevice(keyName, device)

Expected parameter types

Name Type
keyName string
device Lua Table

Description: Sets a key as the current NFC file on a net device

Returns: Nothing

AssignKeyToCharacter

Doors.AssignKeyToCharacter(keyName, character)

Expected parameter types

Name Type
keyName string
character Lua Type

Description: Adds a key to a characters inventory and sets it as the characters current NFC data

Returns: Nothing

Notes: The character parameter can be either a character table, as set out in your mission script, or the internal name of the character to be assigned the key


This file is auto generated, please don't edit manually!

Docs last hacked together on: 04/02/2019 17:02