is there a way to get the main actor of a unit as game link?
with main actor i mean the actor that has usually the same name as the unit itself and contains the portrait image model and other stuff.
background is that im working on a function that returns the portrait image of a unit and also works for custom units, so i need a way to get the main actor of a unit type, to read out the portrait data field.
There is a function called Actor from Unit. Just try that one :)
€ just realized it is not that simple in Gui, since there are Actor variables or Game Link: Actor variables and you don't seem to be able co convert an actor to game link (or am I just blind?)
I actually did just what you want to do, but with the prerequisite, that each unit's actor has the same id like the unit, so I skipped this conversion step, avoiding your problem completely. But thats probably not, what you want.
There is a function called Actor from Unit. Just try that one :)
€ just realized it is not that simple in Gui, since there are Actor variables or Game Link: Actor variables and you don't seem to be able co convert an actor to game link (or am I just blind?)
I actually did just what you want to do, but with the prerequisite, that each unit's actor has the same id like the unit, so I skipped this conversion step, avoiding your problem completely. But thats probably not, what you want.
yes thats exactly what i do.
and yes, you cant convert actor to game link, thats the problem (dunno why)
currently the function requires the main actor to have the same name as the unit itself (what usually the case), problem is, that if you rename that actor the func wont return the correct portrait any more, even if its still linked to the unit.
so it seems like we 2 got the same problem
in fact, the game reads out the correct portrait image even if you rename the actor (default ui).
hi,
is there a way to get the main actor of a unit as game link? with main actor i mean the actor that has usually the same name as the unit itself and contains the portrait image model and other stuff.
background is that im working on a function that returns the portrait image of a unit and also works for custom units, so i need a way to get the main actor of a unit type, to read out the portrait data field.
There is a function called Actor from Unit. Just try that one :)
€ just realized it is not that simple in Gui, since there are Actor variables or Game Link: Actor variables and you don't seem to be able co convert an actor to game link (or am I just blind?)
I actually did just what you want to do, but with the prerequisite, that each unit's actor has the same id like the unit, so I skipped this conversion step, avoiding your problem completely. But thats probably not, what you want.
yes thats exactly what i do.
and yes, you cant convert actor to game link, thats the problem (dunno why)
currently the function requires the main actor to have the same name as the unit itself (what usually the case), problem is, that if you rename that actor the func wont return the correct portrait any more, even if its still linked to the unit.
so it seems like we 2 got the same problem
in fact, the game reads out the correct portrait image even if you rename the actor (default ui).
no more ideas? =/