getSpeech: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(linking to Speech section of Tokens page. Stub still needs expansion.)
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 4: Line 4:
|version=1.3b48
|version=1.3b48
|description=
|description=
Returns the [[Introduction to Tokens#Speech|Speech]] value from the [[Current Token]].
Returns the requested [[Introduction to Tokens#Speech|Speech]] value from the [[Current Token]].


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getSpeech(name)
getSpeech(id)
</source>
getSpeech(id, tokenRef)
</syntaxhighlight>
 
'''Parameters'''
{{param|id|String ID for the desired speech.}}
{{param|tokenRef|Either the token [[getSelected|{{code|id}}]] or [[getTokenName|Token Name]] of the token to list the desired speech from.}}
{{Note|Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.}}
 
|example=
Get the speech with the ID ''signature_line''.
<syntaxhighlight lang="mtmacro" line>
<b>[h: myline = getSpeech("signature_line")]</b>
</syntaxhighlight>
Returns:
<b>It's clobberin time!</b>
}}
}}
[[Category:Speech Function]]
[[Category:Speech Function]]

Latest revision as of 23:59, 13 May 2024

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

getSpeech() Function

Introduced in version 1.3b48
Returns the requested Speech value from the Current Token.

Usage

getSpeech(id)
getSpeech(id, tokenRef)

Parameters

  • id - String ID for the desired speech.
  • tokenRef - Either the token id or Token Name of the token to list the desired speech from.
Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.

Example

Get the speech with the ID signature_line.
<b>[h: myline = getSpeech("signature_line")]</b>

Returns:

It's clobberin time!