Here is the problem
If i want to Issue order to a unit, you have to fill in Ability Command.
The problem is that i have 20 ability commands and i dont want to make 20+ functions to fill those in.
So i have created a variable AbilityComman[Array] of type Ability Command
Now, Blizzard was kind enough to NOT include the recognition to the variable "ability command". When i click the field "select ability command", the variable selection is empty!!!
Does anyone know how to write a custom script that refers to the variable "ability_command[tempInteger]"
Here is my trigger
Events
Dialog - Any Dialog Item is Clicked by Player Any Player
Local Variables
temp Integer = 0 <Integer>
Conditions
Actions
General - For each integer temp Integer from 1 to UI - Number of abilities with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Used dialog item) == UI - Abilities Button[temp Integer]
Then
Unit - Order UI - Last Selected Unit[(Triggering player)] to (Ability Command) *HERE IS THE PROBLEM, CANT SELECT ANY VARIABLES*
Else
My variable for the ability commands
UI - Abilities Command = No Ability Command <Ability Command[20]>
(i did try to change it to every possible value, array, type etc )
You have to add a "lv_" to a local variable. So it becomes:
lv_ability_command[lv_tempInteger]
If that doesn't work then press Shift+F11 to open the script view and search your trigger in there. Then you can see all variable names in the first few lines.
In case what s3rius said didn't clear it up, I'll anaylze his custom script of "lv_ability_command[lv_tempInteger]" that you would place in the Select Ability Command portion of the action.
"lv_": "lv_" (either one of them) can either be "lv_" (local variable), "gv_" (global variable), or "lp_" (local parameter), which designates where the variable is located.
"ability_command": To find the value that belongs here, select your array variable and look for "Script Identifier:" The value listed here should replace "ability_command".
"tempInteger": This is the integer variable that refers to the index of your array. Find the name you need for the custom script in the same way as "ability_command". You can replace "lv_tempInteger" with an integer value, such as "0", if desired.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Here is the problem
If i want to Issue order to a unit, you have to fill in Ability Command.
The problem is that i have 20 ability commands and i dont want to make 20+ functions to fill those in.
So i have created a variable AbilityComman[Array] of type Ability Command
Now, Blizzard was kind enough to NOT include the recognition to the variable "ability command". When i click the field "select ability command", the variable selection is empty!!!
Does anyone know how to write a custom script that refers to the variable "ability_command[tempInteger]"
Here is my trigger
Events
Dialog - Any Dialog Item is Clicked by Player Any Player
Local Variables
temp Integer = 0 <Integer>
Conditions
Actions
General - For each integer temp Integer from 1 to UI - Number of abilities with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Used dialog item) == UI - Abilities Button[temp Integer]
Then
Unit - Order UI - Last Selected Unit[(Triggering player)] to (Ability Command) *HERE IS THE PROBLEM, CANT SELECT ANY VARIABLES*
Else
My variable for the ability commands
UI - Abilities Command = No Ability Command <Ability Command[20]>
(i did try to change it to every possible value, array, type etc )
You have to add a "lv_" to a local variable. So it becomes:
lv_ability_command[lv_tempInteger]
If that doesn't work then press Shift+F11 to open the script view and search your trigger in there. Then you can see all variable names in the first few lines.
@PepperLoaT: Go
In case what s3rius said didn't clear it up, I'll anaylze his custom script of "lv_ability_command[lv_tempInteger]" that you would place in the Select Ability Command portion of the action.
"lv_": "lv_" (either one of them) can either be "lv_" (local variable), "gv_" (global variable), or "lp_" (local parameter), which designates where the variable is located.
"ability_command": To find the value that belongs here, select your array variable and look for "Script Identifier:" The value listed here should replace "ability_command".
"tempInteger": This is the integer variable that refers to the index of your array. Find the name you need for the custom script in the same way as "ability_command". You can replace "lv_tempInteger" with an integer value, such as "0", if desired.