js:MapTool.chat: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page Js:MapTool.chat to js:MapTool.chat: Converting page titles to lowercase)
No edit summary
Line 10: Line 10:


|usage=
|usage=
<source lang="javascript" line>
<syntaxhighlight lang="javascript" line>
MapTool.chat.broadcast(msg);
MapTool.chat.broadcast(msg);
MapTool.chat.broadcast(lstOfPlayers, msg);
MapTool.chat.broadcast(lstOfPlayers, msg);
</source>
</syntaxhighlight>


'''Parameters'''
'''Parameters'''
Line 29: Line 29:


|usage=
|usage=
<source lang="javascript" line>
<syntaxhighlight lang="javascript" line>
Maptool.chat.broadcastToGM(msg)
Maptool.chat.broadcastToGM(msg)
</source>
</syntaxhighlight>


'''Parameters'''
'''Parameters'''

Revision as of 18:38, 15 March 2023

 This article describes a feature or macro function that is experimental and may be subject to change.

Within the javascript environment used by js.eval, MapTool.chat is the entry point for sending chat messages. This page details the attributes and functions available on the MapTool.chat object.


chat.broadcast() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.10.0
Like the broadcast() macro.

Usage

MapTool.chat.broadcast(msg);
MapTool.chat.broadcast(lstOfPlayers, msg);

Parameters

  • msg String to send
  • lstOfPlayers An array containing the names of the players to include


chat.broadcastToGM;() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.10.0
Like chat.broadcast, but only includes GMs.

Usage

Maptool.chat.broadcastToGM(msg)

Parameters

  • msg String to send


See Also

JS: MapTool