Morphing Buildings Guide
Author: thekaatz (sc2mapster.com)Tags: intermediate data ability  
Source: http://forums.sc2mapster.com/resour...Added 13 years ago 

Guide to morph one building into another, step-by-step!

Example: Barracks -> CC
1. We have to create an ability for the morph itself. I'm going to do so by copying the values of the ability "Command Center - Upgrade To Planetary Fortress" but any other morph ability works too.




Create Ability
2. Then were going to adjust the values to fit our needs. I've marked them on the screenshot. AbilityProperties




2.1 Go to the Commands+ field. We have to add a build button to the execute value and you can add any requirements you wish for the morph. For the example, I added the Build Command Center button and removed any requirements to let me morph whenever I have the necessary resources. AbilityCommands




2.2 Now we're going to define the Cost of the Ability by editing the Cost+ field. It's all up to you what your morphing will cost, mine costs nothing at all. AbilityCost




2.3 With this step we determine the actual result of our morph and its duration. We go to the Info+ field and set the unit to the one we want to have after the morph is finished. In the durations field you just set Abilities Delay ,Actor Duration and Stats Delay to the same value to set the time the morph will take.AbilityInfo




3. Now we add the ability we just created, in my case MorphBarracksToCC, to the unit that should be morphed into another. So change to the Unit tab and select the unit that's going to receive the ability. Then just add the Ability to the abilities+ field. AddAbility




3.1 Let's add a button to the CommandCard to let the morph take place when we click it. Go to CommandCard+ and create a new one with the button you like and set Command Type to Ability Command, Ability to the created ability and Ability Command to Build...(the new building). Now the button is functional and all that's left is to add the events to the actors.




CommandCard
4. Now that's where the magic happens and i failed MANY times before it turned out to be extremely easy :) Change to the Actors tab and select the actor of the first building. Now go to the Events+ Field and add the marked ones from the screenshot (modify "morph from" and "morph to" to fit your needs).

Edit: Actually you only need the AbilMorph.*.Finish event with the destroy immediate trigger to make it work. But if I remember correctly i got issues with some morphs, could be my imagination though :)




ActorEvents
4.1 That's the final step: Select the actor of the second building and add this single event. That's it. ActorEvents2




Now if you followed my instructions, the building will change its model and abilities after the morph is complete.






Star Depot
Contact      Login