I'm working on a mod. As part of that mod I'm trying to revamp the build system. I'm having issues implementing this system right now as I'm not sure how to go about doing it. I've read through a number of tutorials online, but to no avail. The best way I can describe the system I'm trying to implement is with a practical example given below.
Imagine you start a match as Terran and you OWN the two nearest vespian geysers. I don't mean a Refinery on those geysers, but the actual geysers themselves (i.e. normally the geysers belong to the neutral faction, but now they'd belong to player 1).
Now imagine that geyser has a functional command button that allows you to construct a refinery on the geyser when you click that button.
My question is how would you do this (this second part)? I've investigated using morph, addons, and morph placements, but they all have their issues and seem a bit hacky.
I believe this must have been done somewhere before. I simply want to have a building that's able to construct other buildings on top of it. When the buildings are destroyed (i.e. the Refinery is destroyed), then the geyser will still be there and a new Refinery can be built from it again after 10 seconds.
Has anyone seen this type of functionality anywhere before/is there a standard way of doing this? I imagine there is one. Any help is appreciated.
Off the top of my head I would have to say that first you create a new unit and give it model of a vepene geyser. Then, give the new unit an morph ability that builds the refinery. In order to get it working correctly you have to dabble in Actor Events. For example, you create the refinery actor when the button is clicked on and immediately destroy the Geyser. Just reverse the process when the refinery dies. It would look something like this...
But that is just the simple part, if you plan to add a morph animation then you would have to add that as well.
Actor events are extremely fun and powerful (visual wise) once you get the hang of it, read up on them as much as you can and it will all start to make sense eventaully.
Rollback Post to RevisionRollBack
The Team - TnTProductions
TnTProductions latest Project - Docking Bay 13
TnTProductions Epic RPG in the making - Psionics: Chaos Rising
Check out our website on wixx! http://bulletbutter.wix.com/tntproductions
Hi,
I'm working on a mod. As part of that mod I'm trying to revamp the build system. I'm having issues implementing this system right now as I'm not sure how to go about doing it. I've read through a number of tutorials online, but to no avail. The best way I can describe the system I'm trying to implement is with a practical example given below.
Imagine you start a match as Terran and you OWN the two nearest vespian geysers. I don't mean a Refinery on those geysers, but the actual geysers themselves (i.e. normally the geysers belong to the neutral faction, but now they'd belong to player 1).
Now imagine that geyser has a functional command button that allows you to construct a refinery on the geyser when you click that button. My question is how would you do this (this second part)? I've investigated using morph, addons, and morph placements, but they all have their issues and seem a bit hacky.
I believe this must have been done somewhere before. I simply want to have a building that's able to construct other buildings on top of it. When the buildings are destroyed (i.e. the Refinery is destroyed), then the geyser will still be there and a new Refinery can be built from it again after 10 seconds.
Has anyone seen this type of functionality anywhere before/is there a standard way of doing this? I imagine there is one. Any help is appreciated.
Actor Events
Off the top of my head I would have to say that first you create a new unit and give it model of a vepene geyser. Then, give the new unit an morph ability that builds the refinery. In order to get it working correctly you have to dabble in Actor Events. For example, you create the refinery actor when the button is clicked on and immediately destroy the Geyser. Just reverse the process when the refinery dies. It would look something like this...
Refinery Actor Events: UnitBirth.Refinery - Ref Destroy GeyserUnit UnitDeath.Refinery - Create GeyserUnit
Ref = Reference in the list.
But that is just the simple part, if you plan to add a morph animation then you would have to add that as well.
Actor events are extremely fun and powerful (visual wise) once you get the hang of it, read up on them as much as you can and it will all start to make sense eventaully.
@bulletbutter: Go
He means how do you do built on units via an Issue Order command.
@acsarutobi: Go
I would say use the Instant placement flag of the Build ability.
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