I have a custom ability that is based on Charge Gold and Lumber that costs 1 lumber to use and I am trying to write a trigger that orders a specific unit to use that skill once every second.
I tried using the GUI method of Unit - Order Unit to Ability but I cannot find Charge Gold and Lumber anywhere in the GUI's preset ability lists so I tried using custom script: to issue the order (since Charge Gold and Lumber's order ID is neutralspell).
[DEL]However, this doesn't work. Anybody knows why?[/DEL] After testing again, it turned out that the skill was being activated except that it was not giving off the 'not enough lumber' warning when trigger-activated so when the player had no lumber, it looked like nothing was happening.
I tested it again using conventional skills like the keeper's entangling roots and when ordering the keeper to cast roots on targets while he had no mana or while the skill was still on cooldown, it did not show the error messages that it would have when manually clicked.
So with the original issue resolved the next question is: is there any way for trigger-activated skills to cause system messages like 'not enough mana', 'not enough gold', 'spell is not ready', etc. to show as if it was manually clicked?
I tried using the GUI method of Unit - Order Unit to Ability but I cannot find Charge Gold and Lumber anywhere in the GUI's preset ability lists so I tried using custom script:
JASS:
call IssueImmediateOrderBJ( gg_unit_E002_0013, "neutralspell" )
[DEL]However, this doesn't work. Anybody knows why?[/DEL] After testing again, it turned out that the skill was being activated except that it was not giving off the 'not enough lumber' warning when trigger-activated so when the player had no lumber, it looked like nothing was happening.
I tested it again using conventional skills like the keeper's entangling roots and when ordering the keeper to cast roots on targets while he had no mana or while the skill was still on cooldown, it did not show the error messages that it would have when manually clicked.
So with the original issue resolved the next question is: is there any way for trigger-activated skills to cause system messages like 'not enough mana', 'not enough gold', 'spell is not ready', etc. to show as if it was manually clicked?