broadcast

From RPTools Wiki
Revision as of 14:31, 15 December 2013 by Wolph42 (talk | contribs)
Jump to navigation Jump to search

broadcast() Function

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

Introduced in version 1.3b77

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
 This article needs: Examples

This function lets send you a message directly to the chat area of another/all connected maptool clients. It does not display the senders name or token image in front of the message.

It lets send you a message either to all or a list of players - use the player names or the keyword "gm". As delimiter you can specify either a string list separator character or "json" if you specify the target list as json array. The big difference between a 'normal' chat message is: 1. if the message is part of a macro then the message is send even if the macro is aborted(after the broadcast). 2. the sender of the message is NOT displayed and 3. if you broadcast an execLink() then that macro is AUTOMATICALLY executed on the clients its broadcasted to, with the exception to the client that sends the message!

Usage

 broadcast(message, [targets], [delimiter])

Parameters {{param|message|a message that is broadcasted to the users that are listed as parameters.

  • targets - are the user names (so not token names) but the names of the users that are logged in. "gm" is also a valid parameter to give. E.g.: "tim, tom, tarra". Defaults to all players (so if no parameter is given the message is send to all players).

{{param|delim|The delimiter used to separate the values in the String List that is returned, defaults to ",". If "json" is specified, a JSON array is returned instead of a String List.