Meteor 2 Scripting Functions
PDA
bool getPdaOpen()
Deterine if the PDA tablet is currently open.

Example
if(getPdaOpen())
    print("PDA is open");
else
    print("PDA is not open");

See also
setPdaOpen

void setPdaOpen(bool open)
Open or close the PDA tablet on the local computer.

Example
// open PDA
setPdaOpen(true);

See also
getPdaOpen

bool addPdaMessage(string subject, string message)
Add message to the PDA tablet on the local computer.

Example
// add message to PDA
addPdaMessage("Test Message", "This is a test message\nThis is line 2");

Comments
If a message with the subject already exists then the message is not added.
This function does not open the PDA. Use setPdaOpen(true) to display the message immediately.

See also
loadPdaMessage removePdaMessage

void loadPdaMessage(string sectionName, bool showPda)
Load a PDA message from the current briefing file (MapName.txt).

Example
addPdaMessage("my_message_id", true);

Comments
PDA messages are stored in MapName.txt (same name as current map with .txt extension).
For example:
[message_id]
subject=Subject here
Blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah.

See also
addPdaMessage

void removePdaMessage(string subject)
Remove a message from the PDA tablet on the local computer.

Example
removePdaMessage("Test Message");

See also
addPdaMessage

void clearAllPdaMessages()
Remove all messages from the PDA tablet on the local computer.

float getPdaBatteryLevel()
Get the PDA battery level.

Example
// show current PDA battery level
print(getPdaBatteryLevel());

See also
setPdaBatteryLevel

void setPdaBatteryLevel(float level)
Set the PDA battery level.

Example
// set PDA battery level to 50%
setPdaBatteryLevel(50);

Comments
Setting the battery level to 0 will effectively disable the PDA.
The level is automatically clamped between 0 and 100.

See also
getPdaBatteryLevel

bool getPdaSignalOn()
Get the PDA signal/uplink status.

Example
// show current signal status
print(getPdaSignalOn());

See also
setPdaSignalOn

void setPdaSignalOn(bool on)
Set the PDA signal/uplink status.

Example
// Disable PDA signal
setPdaSignalOn(false);

Comments
This affects signal status the icon shown within the PDA and is for visual effect only. The PDA will still function normally.

See also
getPdaSignalOn


Index

Generated on the 23 November 2024 at 08:20:43 (UK Time)