Not possible. They are in seperate catalogs.
I'm watching you
Not possible. They are in seperate catalogs.
I'm watching you
There is no way whatsoever to find an actor gamelink based on a unit? That seems really lame.
Is there even a way to get the unit game link for a unit? There doesn't appear to be.
What are you trying to do? Here's a simple return for the game link of a unit.
I need to show the icon of a unit in a dialog when that unit goes into production. I already did this using a massive collection of variables that took forever to input, but I want to come up with a more automated system now as I am trying to streamline my map.
I think the problem I was having was that I kept trying to pull the unit type from a unit that was in training. Units in training don't appear to actually have a unit type, you have to get it from "Triggering Progress Unit Type"
Still...getting from a unit game link to an image in a dialog is a long annoying road it seems...
Just spent quite a bit of time trying to figure out if you could do anything besides this, but nope. You're going to have to use a switch to set the icon for every possible type of unit.
Yeah I appreciate you taking the time to look at it. Definitely nice to have a second opinion that I have to do it the hard way (read: only way).
@rtschutter: Go
It might be possible to store the game link address for an icon somewhere in the catalog for a unit type and then reference that with a CFVG action. For example (and I'm not 100% sure this would work) you could set a unit's Editor Suffix value to "Assets\Textures\btn-unit-terran-marine.dds."
Could be worth a try. You would have to set one for each unit, but you would no longer need to use variables and functions for referencing those icons.
My Projects:
Malum Ruina: SC2Mapster
Eternal Exile: SC2Mapster
Spine Crawler Madness: SC2Mapster
Xeno Crisis: SC2Mapster
I tried doing that already using the 'description' field, but I had some kind of strange tooltip thing returned instead of the message I put in there. Maybe I did something wrong though, I didn't really spend much time with it.
Quote from rtschutter: GoI tried doing that already using the 'description' field, but I had some kind of strange tooltip thing returned instead of the message I put in there. Maybe I did something wrong though, I didn't really spend much time with it.
I'm pretty sure the description field is text. You would have to use a string field, if anything.
As far as I know its not possible to directly get the main actor type of a unit type, this is, in fact, a very old problem.
However, most units use the convention that the ID of the main actor equals the units ID. This might be helpful to setup a system that works for most cases.
If there is no actor with the units ID in the actor catalog you can have some sort of fallback to a placeholder icon or smth similar.
rtschutter Regular ShmoeSo I need to be able to access the main actor for a unit type via catalogs to retrieve the 'hero-icon' for that unit.
Does anyone have any ideas? There doesn't seem to be any way that I can find to get an actor reference from a unit.