Yea, I can change portrait under that Unit Portrait event. This event happens at unit creation I guess. But if I add Portrait Customize action under any other event, portrait model doesn't change. Any ideas how to induce Portrait Customize event deliberately?
My purpose is to have a vehicle that can be captured and drived by an infantry unit, and would be nice if that vehicle had a portrait of the unit inside it.
Yea, I managed to create a custom portrait actor and use it as unit actor's portrait actor. But how am I supposed to establish communication between that portrait actor and the main actor? They don't seem to share a scope. Portrait actor can't reach main unit actor with ::Host or ::Main values of target field. Main actor doesn't reach portrait actor by name or alias I defined at portrait actor. Any ideas how to make them communicate?
Unfortunately, PortraitCustomize action does nothing if called from under any other events than UnitPortrait. So, it seems the only way to make the portrait change is to initiate UnitPortrait event from an action. But I don't know how to do it.
Hmm..., the Portrait Actor With Death gets signals somehow.
The Viking Fighter/Assault, the Liberator, the Hellion, the Cyclone, the Banshee and the Spectre Unit orders the portrait to play some animations using ::PortraitGameSelf. Seem they use UnitPortrait.*.Configure followed by a Validate Unit term then an action targeting ::PortraitGameSelf.
Ok, ::PortraitGameSelf reference worked, but it seems to be global, and doesn't affect unit's personal portrait only "current portrait" if a unit of the same type is selected. Example: driver enters car A, but car B is selected, car B's portrait gets changed, clicking on car C (which is also empty) will not change the portrait, so it's still driver's face, and after selecting a unit of non-car type, and then selecting back car A, gives us initial portrait of empty car, even though the driver is still inside car A.
So, I guess, I can change the portrait under selection update event to the correct one, using validate unit term. But how to avoid a situation where empty car's being selected portrait changes when driver enters another car? There's no "at" term under transport abil related event.
Use an Is Status term that is adjusted by other events such as the unit being clicked? Or make your transport ability change the status and a Selection Update event does the rest. What about the Selected term?