getTokenMBL: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Added page for getTokenMBL function)
 
No edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 2: Line 2:
{{MacroFunction
{{MacroFunction
|name=getTokenMBL
|name=getTokenMBL
|proposed=false
|trusted=true
|version=1.12
|version=1.12
|description=
|description=Gets the Movement Blocking Layer (MBL) shapes for the token specified.
 
|usage=
|usage=
<syntaxhighlight lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getTokenMBL(id)
getTokenMBL(tokenRef)
</syntaxhighlight>
</syntaxhighlight>
This function retrieves the MBL found on the given token.  The format of the data returned is the same as documented in {{func|getMBL}}.


'''Parameters'''
'''Parameters'''
{{param|id|}}
{{param|tokenRef|OPTIONAL: Either the token [[getSelected|{{code|id}}]] or [[getTokenName|Token Name]] of the token to retrieve MBL from.  Defaults to [[Current Token]].}}
{{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.}}


|examples=
<syntaxhighlight lang="mtmacro">
[r:mblData = getTokenMBL()]
</syntaxhighlight>
|also=
[[AI Pathfinding]], {{func|getMBL}}, {{func|setTokenMBL}}
}}
}}
[[Category:VBL Function]]
[[Category:Token Function]]
[[Category:MBL Function]]

Latest revision as of 23:59, 14 May 2024

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

getTokenMBL() Function

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

Introduced in version 1.12
Gets the Movement Blocking Layer (MBL) shapes for the token specified.

Usage

getTokenMBL(tokenRef)

This function retrieves the MBL found on the given token. The format of the data returned is the same as documented in getMBL().

Parameters

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.

Examples

[r:mblData = getTokenMBL()]

See Also