I'm not sure of the specifics but I imagine the Dark Templar would be a good place to look as they have unique portraits for their two variations (I think)
Yes, Unit actors have a field to indicate the actor to use for their portrait. So you can create your own portrait actor and do whatever you want in it.
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?
It doesn't seem like portrait actor shares scope with the unit, so behaviors or abils don't cause actor events.
And again, if I use these events in the main actor, Portrait Customize actions only work under Unit Portrait events, and I can't reach portrait actor from main actor.
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.
Unit applies a behavior, vehicle actor changes portrait with that behavior, I don't think you need to use the portrait actor for it.
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?
I see we can change portrait with upgrade per actor type. Is it possible to do it per actor instance (per unit) with actor events?
@Zolden: Go
I'm not sure of the specifics but I imagine the Dark Templar would be a good place to look as they have unique portraits for their two variations (I think)
Pretty easy. Use the Actor Creation event with a Pass Chance term that uses a Model Swap action.
Seems the dark Templars use theUnit Portrait event, a Model Variation term and a Portrait Customise action.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Yes, Unit actors have a field to indicate the actor to use for their portrait. So you can create your own portrait actor and do whatever you want in it.
@DrSuperEvil: Go @Kanitala: Go
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.
@ArcaneDurandel: Go
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?
You can change portrait using a behavior event.
@SoulFilcher: Go
It doesn't seem like portrait actor shares scope with the unit, so behaviors or abils don't cause actor events.
And again, if I use these events in the main actor, Portrait Customize actions only work under Unit Portrait events, and I can't reach portrait actor from main actor.
@Zolden: Go
Presumably this is possible as demo'd in the rainbow archon:
...unless they copied the timer events to the portrait actor as well...
@PirateArcade | I make games | Ask me things on Discord
Tried the Portrait Game, Portrait Game Self and Portrait Game Unit system references?
Maybe a global query response?
If you are only going to have one of these units at a time you could use a global reference.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@Zolden: Go
Unit applies a behavior, vehicle actor changes portrait with that behavior, I don't think you need to use the portrait actor for it.
I remember seeing the set protrait event action thing, but i cant find it anymore
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
@SoulFilcher: Go
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.
@DrSuperEvil: Go
Nope, didn't work, portrait actor doesn't get messages through the references you mentioned.
Not even a global reference?
The Validate Unit terms any use?
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.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
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?
So ::PortraitGameUnit does nothing?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Yep.
Yea, that did the trick.
So, now all works. After an infantry enters the car, it changes the portrait (if selected) based on infantry type validation.
And if a car is being selected, it changes portrait based on driver's unit type.
All is done by sending signals to portrait actor by ::PortraitGameSelf reference, and portrait actor swaps models based on incoming signal.
Thank you for the help, DrSuperEvil and others.