Skip to content

Plugin

To enter the Plugin keyword in the command line, use one of the options:

  • Press MA + X14 | Macro + X14 | Macro
  • Type Plugin
  • Type the shortcut Pl

The Plugin keyword is an object keyword which is used to access plugins. 

The default function of the Plugin keyword is Go+.

([Function]) Plugin [“Plugin_Name” or Plugin_Number](.[“LuaComponent_Name” or LuaComponent_Number]) (“Argument_Value”)

  • To edit plugin 2, type:
User name[Fixture]>Edit Plugin 2 

 

  • To label plugin 1 “Weakon,” type:
User name[Fixture]>Label Plugin 1 “Weakon” 

 Requirement:

  • Create a plugin that uses an argument when calling a function.

In this example our plugin is plugin 1 of the plugin pool and the argument is called name in the definition of the function. 

Copy CodeLua
```
return function(display_handle, name)
Printf("My name is "..name)

end

- To generate the sentence "My name is Richard Roe" in the command line history, type:
| | |
| ------------------------------------------------------------------ | ------------------------------------------- |
| ![](/img/grandma3/2-4/icon_commandline-input_logo_v2-0-a59235.png) | User name\[Fixture]>Plugin 1 "Richard Roe"  |
Result:
| | |
| ---------------------- | ---------------------- |
| OK : | Plugin 1 "Richard Roe" |
| My name is Richard Roe | |
Response in the command line history
"My name is Richard Roe" is now displayed in the command line history.
---
## Call a Dedicated LuaComponent
**Requirement: **
- Create at least two lua components in the plugin.
For more information on how to create lua components see [Plugins](/grandma3/2-4/plugins/).
- To call the second LuaComponent of plugin 1, type:
| | |
| ------------------------------------------------------------------ | ------------------------------- |
| ![](/img/grandma3/2-4/icon_commandline-input_logo_v2-0-a59235.png) | User name\[Fixture]>Plugin 1.2  |