I'm looking for a way to have a unit be replaced by another unit upon reaching a kill limit (100 kills), and to then change colour (but not team).
So, when a Marine goes from 99 Kills to 100 Kills, it becomes a War Pig, or if a Firebat reaches 100 kills, it becomes a Devil Dog, and both go from being Red to being Yellow, but remain under player control.
I would use an automatic Morph type ability validated by a Unit Compare Kill Count validator. For the colour change you could use a Simple type actor that is created when the Morph abilities are used and on actor creation targets the ::Main reference using a Set Team Color actor message.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
The Morph type ability changes one unit type into another. An example is the Burrow ability used by many zerg units. Under this ability is a flag called Automatic that makes the ability instantly use itself when the costs, requirements and validators are met.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Validators is a data type and under it create a new validator of the type Unit Compare Kill Count. Set the Validator: Compare field to Greater Than logic and the (None): Value field to the number of kills you want.
Put this validator under the Ability: Validator Array field of the Morph ability. There is then the Stats: Flags field which has the Automatic flag.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
As mentioned to chance the colour you need to send a Set Team Colour actor message. This can be done using actor events or triggers. As stated earlier having a Simple type actor is the easiest method but you could also add an event to the Unit type actor of the unit you morph into using an Actor Creation event that uses the Set Team Colour action.
Do the two units cost different amounts? If so you also need the Ignore Unit Cost flag.
Again the Autocast and Autocast Initially On flags are under the Stats: Flags field of the Morph ability. Still automatic has the same effect.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
More likely the actor not being destroyed when the ability finishes. You need to add some actor events to destroy the old actor and create the new one on morph completion.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Under the Actors data type there are Unit type actor for both units you will find several fields starting with Events (eg. Event: Events - Send field). Double click the field to open another window.
Right click the left panel of the window and add a new event. Use an Ability Morph message type and Start subname with a Morph From term and a Destroy actor message. On your warpig actor use an Ability Morph message type and Finish subname with a Morph To term and a Create actor message.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Press the green + at the top of the data editor to open the Actors data type. Find the actors for your Marine and Warpig and find the events fields. Double click them to open another window.
Can you find the Actors data type under the data editor. It has a picture of a yellow Zergling as the icon. The editor should default to having the Units data type open and to the right of that tab is the green + icon.
I'm looking for a way to have a unit be replaced by another unit upon reaching a kill limit (100 kills), and to then change colour (but not team).
So, when a Marine goes from 99 Kills to 100 Kills, it becomes a War Pig, or if a Firebat reaches 100 kills, it becomes a Devil Dog, and both go from being Red to being Yellow, but remain under player control.
I would use an automatic Morph type ability validated by a Unit Compare Kill Count validator. For the colour change you could use a Simple type actor that is created when the Morph abilities are used and on actor creation targets the ::Main reference using a Set Team Color actor message.
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
I... have no idea what you just said.
The Morph type ability changes one unit type into another. An example is the Burrow ability used by many zerg units. Under this ability is a flag called Automatic that makes the ability instantly use itself when the costs, requirements and validators are met.
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
That doesn't help me much. I kinda know the Morph ability, but I don't know flags or validators.
Validators is a data type and under it create a new validator of the type Unit Compare Kill Count. Set the Validator: Compare field to Greater Than logic and the (None): Value field to the number of kills you want.
Put this validator under the Ability: Validator Array field of the Morph ability. There is then the Stats: Flags field which has the Automatic flag.
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
Okay, I've done that. How would I make it also change the unit's colour when it executes? Say, from orange to yellow?
EDIT: It didn't work, how do I make it auto-cast?
As mentioned to chance the colour you need to send a Set Team Colour actor message. This can be done using actor events or triggers. As stated earlier having a Simple type actor is the easiest method but you could also add an event to the Unit type actor of the unit you morph into using an Actor Creation event that uses the Set Team Colour action.
Do the two units cost different amounts? If so you also need the Ignore Unit Cost flag.
Again the Autocast and Autocast Initially On flags are under the Stats: Flags field of the Morph ability. Still automatic has the same effect.
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
Right. Turns out, it didn't work. The unit changes name from Marine to War Pig, but doesn't change unit. I guess that's the Ignore Unit Cost thing?
Edit: Apparently not. And I was wrong about their name changing. Apparently they're now always called 'War Pig', even without the kills needed.
More likely the actor not being destroyed when the ability finishes. You need to add some actor events to destroy the old actor and create the new one on morph completion.
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
I have no idea how to do that. This is really confusing...
Under the Actors data type there are Unit type actor for both units you will find several fields starting with Events (eg. Event: Events - Send field). Double click the field to open another window.
Right click the left panel of the window and add a new event. Use an Ability Morph message type and Start subname with a Morph From term and a Destroy actor message. On your warpig actor use an Ability Morph message type and Finish subname with a Morph To term and a Create actor message.
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
Could you repeat that in noob speak?
Can you find the actor events first?
Press the green + at the top of the data editor to open the Actors data type. Find the actors for your Marine and Warpig and find the events fields. Double click them to open another window.
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
I can't find whatever that is...
Can you find the Actors data type under the data editor. It has a picture of a yellow Zergling as the icon. The editor should default to having the Units data type open and to the right of that tab is the green + icon.
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