Data Scripting
Data Scripting
We saw in Mission Scripting that Data can have a script attached. Let's have a brief look at what can be done with this.
We have the following globals available:
Globals | |
---|---|
Name | Description |
deviceName | The name of the device, to be used with Devices Lua API |
macAddress | The MAC address of the device |
RunMissionCommand | The function enabling access to mission script functionality |
So for instance, let's say we want to set the Device state to Amok when the data is received:
Devices.SetAmok(deviceName, true);
or trigger an objective to be complete?
RunMissionCommand('Mission.CompleteObjective(mission.objectives.ourObjective)')
Remember... Data is your most powerful weapon!