Parameter
Usage:
Parameter(Number)
Description:
The Parameter command allows you to retrieve command line parameters for scripts. The main use of this command is in custom in-game command scripts, where it allows you to get user input. For instance, if you had a custom command named "test", and a player entered "/test Paul, 17", there would be two valid parameters which you would retrieve using Parameter(1) and Parameter(2). Parameter(3) and upwards would return nothing.
It is also used in the following:
Ability scripts - there is one parameter: the player's level in the ability.
NPC death scripts - there are 15 parameters: the race and class of the dead actor, followed by the X, Y and Z positions, followed by its ten actor globals.
ThreadExecute - ThreadExecute can pass a set of parameters to the script it runs, which can then be accessed with this command.
Triggered scripts - these scripts receive one parameter containing the ID of the trigger which called the script
Example:
Function Main()
// Get damage of spell
SpellLvl = Parameter(1)
Damage = 10 + SpellLvl
// Tell player
Output(Actor(), "You do " $+ Damage $+ " damage...")
Return()
End Function
Comments (0)
You don't have permission to comment on this page.