Built On

From HIVE
Revision as of 06:16, 21 November 2010 by DevliN (talk | contribs) (1 revision: StarEdit.net Wiki)
Jump to navigation Jump to search

The Built On Unit Property in the Data Editor is used to specify which existing units the unit is allowed to be built on. This means that the unit may no longer be built normally and must be constructed on top of one of the units listed. In normal StarCraft II maps, this property is used to require that certain structures be built on top of Vespene Geysers.

Using the Built On property

Creating the bottom unit

To create the base, it is important to copy it from the original Vespene Geyser unit. To do so, right click on the Vespene Geyser unit and click Duplicate Object. The reason we are duplicating the unit is so it will have a copy of the actor and so that it will already have the Gas (Raw Vespene Geyser) behavior, both of which are essential. Click on the check box beside the actor and then click OK.

BuiltOn1.png

Now you may edit the unit to suit your needs, but do not remove the Gas (Raw Vespene Geyser) behavior or any events from the actor.

Creating the top unit

To create the top unit, simply create any unit you wish (or modify an existing unit), then give it the Harvestable Vespene Geyser Gas behavior, and edit the Techtree - Built On property to reference the bottom unit you created.

BuiltOn2.png

Notes

If you do not want the bottom or top unit to show any resources, you can edit the Stats - Flags property and uncheck Show Resources.

BuiltOn3.png

The reason the bottom unit needs to have the Gas (Raw Vespene Geyser) behavior is because currently in StarCraft II, if you try to build on a unit that does not have a resource behavior, the game will crash. The reason the top unit should have the Harvestable Vespene Geyser Gas behavior is so that specific actor events will fire when the top unit is built upon the bottom unit.

Details

Actor events

Behaviour.RawVespeneGas

This event has 3 useful sub names for the Built On property. They are Host Start, Host Finish and Host Clear. Host Start occurs when the top unit begins to build on top of the bottom unit. Host Finish is when the unit finishes constructing, and Host Clear is when the unit is no longer on top of the bottom unit.

Signal.*.Covered and Signal.*.Uncovered

I have yet to find a way to recreate these events manually, which is why the Vespene Geyser must be copied. The covered event occurs when the top unit is finished being constructed. The uncovered event occurs when the top unit is no longer on the bottom unit.