It's a custom command, you type something like "-alt" and it causes the model to switch. Entering -alt again, causes them to switch back. That's the idea at least.
Then this should be in the triggers forum. I believe triggers can also give the model swap message but if not just send it a signal that the events of the actor uses.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
When trigger generating a model swap actor message the variation parameter must be 0 and not its default of -1 or it will throw an error.
Here is an example trigger demonstrating a command to swap selected units to any model, entered by the argument of the command. Eg all selected units will be model swapped to the marine model with the command "-swap Marine".
Model Swap Test
Events
Game - Player Any Player types a chat message containing "-swap ", matching Partially
Local Variables
chat message = (Entered chat string) <String>
arg1 = (Word 2 of chat message) <String>
arg1 parsed = No Game Link <Game Link - Model>
u = No Unit <Unit>
Conditions
(String((Word 1 of chat message)) as Lower Case) == "-swap"
Actions
UI - Display "Model Swap Test" for (All players) to Subtitle area
Variable - Set arg1 parsed = (Game Link(arg1))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Catalog Models entry arg1 parsed is valid) == True
Then
UI - Display (Text((String(arg1 parsed)))) for (All players) to Subtitle area
Unit Group - For each unit u in (Selected units for player (Triggering player)) do (Actions)
Actions
Actor - Send actor message (ModelSwap arg1 parsed 0) to main actor of unit u
Else
UI - Display "Invalid Type" for (All players) to Subtitle area
I'm trying to figure out the simplest way to give a unit 2 models, that can be accessed via an ingame command that simply switches between them.
A follow up question would be how to make the second model's scaling/proportions match the first model.
Teach me wise ones!
The Model Swap event action is probably the easiest approach.
Could you give more details as to what ingame commands you will be using?
If using a model swap you will just need to adjust the scale of one of the models under the Models data type.
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
It's a custom command, you type something like "-alt" and it causes the model to switch. Entering -alt again, causes them to switch back. That's the idea at least.
Then this should be in the triggers forum. I believe triggers can also give the model swap message but if not just send it a signal that the events of the actor uses.
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
When trigger generating a model swap actor message the variation parameter must be 0 and not its default of -1 or it will throw an error.
Here is an example trigger demonstrating a command to swap selected units to any model, entered by the argument of the command. Eg all selected units will be model swapped to the marine model with the command "-swap Marine".
This is perfect! I got it to work. Thank you guys!