The commander for the marine team (a marine loaded into the stationary command console structure) should be able to place buildings anywhere on the map. I have this part working based on the SCV Calldown Supply Depot ability, except that the buildings currently warp in from 0% to 100%.
However the building should start at 0% progress.
His allies control individual marines, and those marines must build any building that he drops.
So in summary:
Commander (technically a Structure) places buildings at 0% completion, but does not contribute to their construction progress.
Marine units actually construct the building from 0% to 100%.
Multiple marines = faster construction (planning on borrowing from the campaign upgrade for multiple scv construction)
Marines can halt / resume progress easily
Marines do not "hover" around the constructing building like an SCV, but should just stand next to it
Anyway if anyone has any insight into an approach for the commander's "place but don't construct" and the marine unit's "don't place but construct" abilities, I would appreciate it!
Thanks for the suggestion. That had crossed my mind, however it brings up a host of problems with other triggers involving things like events, for example "unit construction completed". I would then have to build in logic to address the workaround. I'm really searching for an in editor solution. If I need to get my hands dirty with some galaxy scripting I will do so.
I spent some time working on this problem last night.
Based on the fact that SCVs can "halt" progress on a building and resume it later, my approach was to add the "Build In Progress" ability on the buildings that are placeable. Unfortunately the name of the "halt" command is actually "Cancel", so two Cancel commands appear under the ability command list... you have to pick the right one. One is halt and one is cancel/destroy. I checked as well as I could to make sure that I was choosing the proper Cancel command.
I then attempted to create a trigger such that:
Events
Any unit has started construction progress
Actions
Issue order (Command Console - Build (Calldown) - Cancel ) to (triggering unit)
Issue order ( Build in Progress - Cancel ) to (triggering progress unit)
Sadly this did not work and I had to go to sleep. I haven't had a chance to tweak it, but I think the general idea is on the right path. Effectively using the ability command "Cancel" (halt) so that the progress is stopped right as it starts, and then giving a build ability to the marines.
As a last note, the multiple builders seems simple enough, just copy the ability "SCV - Advanced Construction" and modify the Maximum Builders to X, and the Power Build Ratio to > 0.
As mentioned, I would prefer a less hacked in solution. Using that solution would mean that built-in editor functions would be worthless in many respects, and cause a huge layer of logic triggers that I would have to maintain.
All buildings that you choose to have constructible will need the "Build In Progress" ability.
The first build ability is for the command console, which has 500 range in my case to allow construction anywhere on the map, but could be whatever.
The second build ability is a copy of the first, but with range modified to 0. This is for the marines. It is a copy because the marines need to be able to build the same structures, they just don't have a command card button to start construction, but right clicking can allow them to resume.
You will need two copies of a "build" ability type. Be sure to set the following flags on the build abilities to true:
worker is maintained
interruptible
Additionally there is a trigger to prevent the command console (structure placer) from "building" the structures.
Trigger (Halt Construction by structure placer)
Events
Any unit construction is resumed
Any unit construction is started
Conditions
(Unit type of (Triggering unit)) == Command Console - NS
Actions
Unit - Order (Triggering progress unit) to ( Halt) (Replace Existing Orders)
In any case this appears to be working functionally. I am just adding in some actor events to give the marines a build animation, etc.
P.S. Copying the "SCV - Advanced Construction" ability, setting its max builders attribute, and giving it to the marine unit allowed multiple of them to power build a structure.
I'm working on a Natural Selection map.
The commander for the marine team (a marine loaded into the stationary command console structure) should be able to place buildings anywhere on the map. I have this part working based on the SCV Calldown Supply Depot ability, except that the buildings currently warp in from 0% to 100%.
However the building should start at 0% progress.
His allies control individual marines, and those marines must build any building that he drops.
So in summary:
Anyway if anyone has any insight into an approach for the commander's "place but don't construct" and the marine unit's "don't place but construct" abilities, I would appreciate it!
Just a passing thought.
Set the start life of any buildings to 1. Give the marines a repair ability. Only let buildings function while at above a certain threshold of health.
@Eiviyn: Go
Thanks for the suggestion. That had crossed my mind, however it brings up a host of problems with other triggers involving things like events, for example "unit construction completed". I would then have to build in logic to address the workaround. I'm really searching for an in editor solution. If I need to get my hands dirty with some galaxy scripting I will do so.
I spent some time working on this problem last night.
Based on the fact that SCVs can "halt" progress on a building and resume it later, my approach was to add the "Build In Progress" ability on the buildings that are placeable. Unfortunately the name of the "halt" command is actually "Cancel", so two Cancel commands appear under the ability command list... you have to pick the right one. One is halt and one is cancel/destroy. I checked as well as I could to make sure that I was choosing the proper Cancel command.
I then attempted to create a trigger such that:
Events
Actions
Sadly this did not work and I had to go to sleep. I haven't had a chance to tweak it, but I think the general idea is on the right path. Effectively using the ability command "Cancel" (halt) so that the progress is stopped right as it starts, and then giving a build ability to the marines.
As a last note, the multiple builders seems simple enough, just copy the ability "SCV - Advanced Construction" and modify the Maximum Builders to X, and the Power Build Ratio to > 0.
Do as Eiviyn said. The problem is solvable with checking the custom value of a unit (health) and then doing what you want.
@o3210: Go
As mentioned, I would prefer a less hacked in solution. Using that solution would mean that built-in editor functions would be worthless in many respects, and cause a huge layer of logic triggers that I would have to maintain.
@scmapcritic: Go
Ok, I have managed to do it as such:
All buildings that you choose to have constructible will need the "Build In Progress" ability.
You will need two copies of a "build" ability type. Be sure to set the following flags on the build abilities to true:
Additionally there is a trigger to prevent the command console (structure placer) from "building" the structures.
Trigger (Halt Construction by structure placer)
Events
Conditions
Actions
In any case this appears to be working functionally. I am just adding in some actor events to give the marines a build animation, etc.
P.S. Copying the "SCV - Advanced Construction" ability, setting its max builders attribute, and giving it to the marine unit allowed multiple of them to power build a structure.