Template:API member: Difference between revisions
Jump to navigation
Jump to search
TeamSpecBot (talk | contribs) Template: scripting reference member block |
TeamSpec theme: colours move from inline styles to MediaWiki:Common.css classes |
||
| Line 1: | Line 1: | ||
<includeonly><div | <includeonly><div class="ts-api"><div class="ts-api-signature">{{{signature|{{{name|}}}}}}</div><div class="ts-api-kind">'''{{{kind|Member}}}'''{{#if:{{{scripts|}}}| · Available to {{{scripts}}}}}</div> | ||
{{{description|}}} | {{{description|}}} | ||
{{#if:{{{params|}}}|<div style="margin-top:6px;">'''Parameters'''</div> | {{#if:{{{params|}}}|<div style="margin-top:6px;">'''Parameters'''</div> | ||
Latest revision as of 08:01, 20 October 2026
One member of a gamemode scripting class: its signature, what it does, its parameters and what it returns. Put the member's own heading (its exact name) just above it, so links can point at Page#member_name.
Usage
=== respawn_in ===
{{API member
|name=respawn_in
|kind=Method
|signature=respawn_in(entity_id: int, seconds: float) -> void
|scripts=<code>server.gd</code>, <code>bot.gd</code>
|params=* <code>entity_id</code>: <code>int</code>
* <code>seconds</code>: <code>float</code>
|returns=<code>void</code>
|description=Brings the player back after the given time.
}}
Parameters
name: the member's name.kind: Method, Hook, Property or Constant.signature: the full signature, shown in code style. Write|for a pipe.scripts: which scripts may use it (optional).params: a bullet list of parameters (optional).returns: the return type (optional).description: what it does.