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
Dialog - Any Dialog Item is Clicked by Player Any Player
temp Integer = 0 <Integer>
General - For each integer temp Integer from 1 to UI - Number of abilities with increment 1, do (Actions)
General - If (Conditions) then do (Actions) else do (Actions)
(Used dialog item) == UI - Abilities Button[temp Integer]
Unit - Order UI - Last Selected Unit[(Triggering player)] to (Ability Command) *HERE IS THE PROBLEM, CANT SELECT ANY VARIABLES*
My variable for the ability commands
UI - Abilities Command = No Ability Command <Ability Command>
(i did try to change it to every possible value, array, type etc )
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.