Mission Lua API: Difference between revisions
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| characterTable || Lua Table | | characterTable || Lua Table | ||
Line 33: | Line 35: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| sender || string | | sender || string | ||
Line 46: | Line 50: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| networkTable || Lua Table | | networkTable || Lua Table | ||
Line 57: | Line 63: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| characterTable || Lua Table | | characterTable || Lua Table | ||
Line 72: | Line 80: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| sender || Lua Type | | sender || Lua Type | ||
Line 88: | Line 98: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| deviceTable || Lua Table | | deviceTable || Lua Table | ||
Line 101: | Line 113: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| deviceTable || Lua Table | | deviceTable || Lua Table | ||
Line 114: | Line 128: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| deviceTable || Lua Table | | deviceTable || Lua Table | ||
Line 125: | Line 141: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| deviceTable || Lua Table | | deviceTable || Lua Table | ||
Line 136: | Line 154: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| objectiveTable || Lua Table | | objectiveTable || Lua Table | ||
Line 147: | Line 167: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| objectiveTable || Lua Table | | objectiveTable || Lua Table | ||
Line 158: | Line 180: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| objectiveTable || Lua Table | | objectiveTable || Lua Table | ||
Line 169: | Line 193: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| fromCharacter || Lua Table | | fromCharacter || Lua Table | ||
Line 194: | Line 220: | ||
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''': | '''Docs last hacked together on''': 10/11/2017 11:07 | ||
[[Catagory:Modding]][[Catagory:LuaAPI]] | |||
[[ | |||
[[ |
Revision as of 11:51, 10 November 2017
Mission
Description
The Mission API controls the flow of the mission, this includes starting and stopping the mission, triggering hints and messages and sending data between varying mission characters
Functions
MissionStarted
Mission.MissionStarted()
Description: This should be called once the initial state of the mission has been set It will cause the game to begin gameplay
Returns: Nothing
MissionCompleted
Mission.MissionCompleted()
Description: This should be called when the final objective of the mission has been completed It will trigger the game to fade to black and return to the main menu
Returns: Nothing
AddCharacter
Mission.AddCharacter(characterTable)
Expected parameter types
Name | Type |
---|---|
characterTable | Lua Table |
Description: Register and spawn a chracter in the game
Returns: Nothing
SendMessageToPlayer
Mission.SendMessageToPlayer(sender, message)
Expected parameter types
Name | Type |
---|---|
sender | string |
message | string |
Description: Send an SMS with the contents _message_ from sender
Returns: Nothing
AddNetwork
Mission.AddNetwork(networkTable)
Expected parameter types
Name | Type |
---|---|
networkTable | Lua Table |
Description: Register a network to the game
Returns: Nothing
ConnectToNetwork
Mission.ConnectToNetwork(characterTable, networkName, accessKey)
Expected parameter types
Name | Type |
---|---|
characterTable | Lua Table |
networkName | string |
accessKey | string |
Description: Connect a device to a specified network
Returns: Nothing
SendData
Mission.SendData(sender, receiver, dataTable)
Expected parameter types
Name | Type |
---|---|
sender | Lua Type |
receiver | Lua Type |
dataTable | Lua Table |
Description: Send a data file from one device to another
Returns: Nothing
Notes: Much like _ConnectToNetwork_ both _senderName_ and _receiverName_ can be character names (assuming those characters have net devices)
SetNetDeviceNFCData
Mission.SetNetDeviceNFCData(deviceTable, dataTable)
Expected parameter types
Name | Type |
---|---|
deviceTable | Lua Table |
dataTable | Lua Table |
Description: Sets NFC data on a mission object
Returns: Nothing
SetNetDeviceNFC
Mission.SetNetDeviceNFC(deviceTable, enabled)
Expected parameter types
Name | Type |
---|---|
deviceTable | Lua Table |
enabled | bool |
Description: Set if a mission object supports NFCAddNetDevice
Returns: Nothing
AddNetDevice
Mission.AddNetDevice(deviceTable)
Expected parameter types
Name | Type |
---|---|
deviceTable | Lua Table |
Description: Add a network device to the mission that's not hackable but can communicate with other devices
Returns: Nothing
AddHackableDevice
Mission.AddHackableDevice(deviceTable)
Expected parameter types
Name | Type |
---|---|
deviceTable | Lua Table |
Description: Add a hackable device to the mission
Returns: Nothing
StartObjective
Mission.StartObjective(objectiveTable)
Expected parameter types
Name | Type |
---|---|
objectiveTable | Lua Table |
Description: Start the provided objective
Returns: Nothing
CompleteObjective
Mission.CompleteObjective(objectiveTable)
Expected parameter types
Name | Type |
---|---|
objectiveTable | Lua Table |
Description: Complete the provided objective
Returns: Nothing
SendNextHint
Mission.SendNextHint(objectiveTable)
Expected parameter types
Name | Type |
---|---|
objectiveTable | Lua Table |
Description: Send the next hint in the Objective's hint array
Returns: Nothing
SendNextMessage
Mission.SendNextMessage(fromCharacter, objectiveTable)
Expected parameter types
Name | Type |
---|---|
fromCharacter | Lua Table |
objectiveTable | Lua Table |
Description: Send the next message in the Objective's message array from fromCharacter
Returns: Nothing
GetCurrentObjective
Mission.GetCurrentObjective()
Description: Get the name of the current objective
Returns: string
TriggerAutoSave
Mission.TriggerAutoSave()
Description: Triggers an autosave, only if the game is current in a mission
Returns: Nothing
This file is auto generated, please don't edit manually!
Docs last hacked together on: 10/11/2017 11:07 Catagory:ModdingCatagory:LuaAPI