Hello,
Was wondering if anyone could assist me with telling me how I'm able to create button that changes the model of a unit, and another button that changes the color of a unit.
Thank you.
Well there is a couple ways you can do the model change. Via an ability or a triggers.
If you do it via an ability all you need to do for the behavior is create a buff behavior and set it to hidden and add that to an add behavior ability. Next go into the events of the actor of the unit you want to change models. Create a new event.
Set Msg Type to Behavior
Set Source Name to the buff behavior you created
Set Sub Name to On
Now click on the in the sub area of your event where is says ActionDamagePhysics.
Change the message type to Model Swap and then it will give you the option to chose an actor model for the swap.
If you want to switch them back, create a remove behavior ability that removes the buff you made and do the same thing in the events only set the sub name to off.
To do this via triggers, just make a button and put it in the command card. Set the button to Cancel Submenu, so it's clickable but essentially does nothing.
In the events of your triggers Set it to Button Pressed. Select the player and set the button to the button your created.
All you need to do in the actions of the trigger is select Send Actor Message to Unit
Click on the Message in the gray area and set that to model swap and select your actor model, and the change the No Unit to your unit.
While the trigger way to do it is easier, the ability/behavior way is better do to the fact that your don't have to try get 100% specific with your trigger. As long as that behavior is on the unit, the zergling would look like a marine.
To change a unit's color you have 2 options you can add it to your actor events with the same process as the model swap, but you can only set the tint of the unit this way. The tint is going to color the entire unit not just the player color areas.
If you do it via triggers, you can only change the team color, done via the set unit color action. Depending on what look you want depends on how you go about the color change.
Triggers would have the advantage if you want everything to be more dynamic so would save you time if you want to be able to fully customize a unit colour for each individual unit and if you wanted to have hundreds of possible model swaps.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Yeah, I know Super. That's what I'm using currently as it's crowding up the triggers. Problem is that I binded all the buttons to the ability "Stop" from not knowing what else to bind it to haha.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, Was wondering if anyone could assist me with telling me how I'm able to create button that changes the model of a unit, and another button that changes the color of a unit. Thank you.
@Darkblizzard: Go
By model change are you talking like tank mode to siege tank mode?
As for color, Do you want to change the player color or the color of the entire unit?
Edit: Spelling.
By model change I mean like a Zergling to a Marine model.
For color, just the color of the unit.
Well there is a couple ways you can do the model change. Via an ability or a triggers.
If you do it via an ability all you need to do for the behavior is create a buff behavior and set it to hidden and add that to an add behavior ability. Next go into the events of the actor of the unit you want to change models. Create a new event. Set Msg Type to Behavior Set Source Name to the buff behavior you created Set Sub Name to On Now click on the in the sub area of your event where is says ActionDamagePhysics. Change the message type to Model Swap and then it will give you the option to chose an actor model for the swap. If you want to switch them back, create a remove behavior ability that removes the buff you made and do the same thing in the events only set the sub name to off.
To do this via triggers, just make a button and put it in the command card. Set the button to Cancel Submenu, so it's clickable but essentially does nothing. In the events of your triggers Set it to Button Pressed. Select the player and set the button to the button your created. All you need to do in the actions of the trigger is select Send Actor Message to Unit Click on the Message in the gray area and set that to model swap and select your actor model, and the change the No Unit to your unit.
While the trigger way to do it is easier, the ability/behavior way is better do to the fact that your don't have to try get 100% specific with your trigger. As long as that behavior is on the unit, the zergling would look like a marine.
To change a unit's color you have 2 options you can add it to your actor events with the same process as the model swap, but you can only set the tint of the unit this way. The tint is going to color the entire unit not just the player color areas.
If you do it via triggers, you can only change the team color, done via the set unit color action. Depending on what look you want depends on how you go about the color change.
Triggers would have the advantage if you want everything to be more dynamic so would save you time if you want to be able to fully customize a unit colour for each individual unit and if you wanted to have hundreds of possible model swaps.
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
Yeah, I know Super. That's what I'm using currently as it's crowding up the triggers. Problem is that I binded all the buttons to the ability "Stop" from not knowing what else to bind it to haha.