Hello, i have a problem. For my UI i need to get string path of image from Game LInk variable.
Lets say i have global variable "Hero Active Skill" with class "Game Link/Ability"
Now in some trigger i need to call icon of Hero Active Skill. I know i can do it with "Convert Game Asset" but how do i get "Hero Active Skill" icon path?
you make another variable "Hero active skill icon" <file - image>
I'm a triggerer
I can't make awesome terrains
I dabble in data
I suck at poems
That is why i do haiku
i suck at them too :(
You mean how to get the path of icon of the in "Hero Active Skill" saved ability?
Unfortunately, that's not trivial. Basically, you can get the icon using the "Catalog Field Value Get" function. Many abilities have several different commands (for instance "Build" abilities), each having a seperate icon. Those icons are not saved directly in the ability, but in a button. Depending on the type of the ability, you will find that button in the "Ability: Commands+" or "Ability: Info+" property. Use this link in the call of "Catalog Field Value Get". Then save the result as a button and call "Catalog Field Value Get" again, this time using the button and the link "UI: Icon", to get the button's icon.
or he can save the image in a variable :)
You''ll probably just want to have function to return the image based on the ability (if you need mulitple images from mulitple abilities.
When I want your opinion...I'll give it to you!
Yay! I did it! Thx Sanktoras!
Basically its trivial now.
If anyone else need to get any info from ability or behavior here how to do it:
1) Save your ability to variable.
NOTE: ID of your ability have to be exactly same as ID of its button. And if you save behavior, then you need to specify behavior type.
2) In parameter of your action or condition you need to use conversion function.
NOTE: There are few of them. Use correct one. If its text you after then use "Convert Game Text" function. If its asset like icon, then use "Convert Game Asset" and so on.
3) In path parameter use "Catalog Field Value Get" and set catalog value from preset. If you after ability info - go for button, if its behavior info then go for behavior. Everything else is self-explanatory.
You must login to post a comment. Don't have an account? Register to get one!