I don't believe there is a way to do this. I think you can compare abilities, so if you need to catch an event where a specific ability is used that's fine, but if you're looking to print the name of an arbitrary ability as text, you're out of luck.
So if I got it right, I gotta have some kind of registry with all the toolclips as strings if I want to use the toolclip texts in a dialog for example?
create this function definition and you can just call it using the ability gamelink:
Get Ability Name
Options: Function
Return Type: Text
Parameters
Ability = No Game Link <Game Link - Ability>
Grammar Text: Get Ability Name(Ability)
Hint Text: (None)
Custom Script Code
Local Variables
temp = "" <String>
Actions
Variable - Set temp = (Value of Abilities lp_ability "Name" for player Any Player)
General - Return (Game text for temp)
lp_ability is entered using the custom script bit.
or import the following library into your map, and that function becomes available.
The question is simple:
How do I convert 'Triggering Ability Command' to a String. So that I can retrieve the name of the triggering ability that is.
Thanks in advance,
Ice_bane @ B.net EU
bump
I don't believe there is a way to do this. I think you can compare abilities, so if you need to catch an event where a specific ability is used that's fine, but if you're looking to print the name of an arbitrary ability as text, you're out of luck.
@sdragoon7: Go
you wont beable to convert it to a string.
What you need is a predefined list of all your abilities used and run some kind of compare against it... loops or switches.....
then you can make a list of hard coded strings that have the same index as your ability list and set a string variable that way.....
As already stated, you can't get the name of the ability command, but you can get the name of the ability being cast.
This will set the string AbilityName to the name of the ability triggering the event.
Is there any way for me to fetch the toolclip of the ability as well and copy it into a string-variable?
Plix help me give you 1000+ internets. <3 <3
:D
No chance, the tooltip is text, and you will never be able to convert text into a string ;)
However you can access it using the Catalog - functions as soon as you have the id of the ability, and you can print it as a message or something.
So if I got it right, I gotta have some kind of registry with all the toolclips as strings if I want to use the toolclip texts in a dialog for example?
I can't get this to work since I can't find "Value: Ability of Ability Command". Plz help mee! :<
@Ice_bane: Go
create this function definition and you can just call it using the ability gamelink:
lp_ability is entered using the custom script bit.
or import the following library into your map, and that function becomes available.
-