There is two triggers associated with the AI regarding this:
AI - Set the general rebuild count for player (Triggering player) Building to (Difficulty(0 / 2 / 14 / 14))
AI - Set the rebuild count for player (Triggering player) Unit Type to (Difficulty(0 / 2 / 14 / 14))
If you pre-place a building on the map and un-check the "initially created" option in the AI tab you have an option here to pick the rebuild count for that specific building as well.
What I don't understand is how to get the computer to actually REBUILD these structures if they die. I have all the pre-placed buildings set to always and even have the triggers above enabled. I've tried changing all of those numbers and nothing gets the computer to rebuild them. There is a check mark under which difficulty they should re-build it under and the only one is very easy as that's all there is. Does someone know how to make another difficultly option that you could set that too?
Now since I couldn't figure out to get this crap to work, I decided to make a trigger system instead.
Here it is:
Building Dies
Events
Unit - Supply Depot (Lowered) [31.00, 52.00] dies
Unit - Supply Depot (Lowered) [31.00, 50.00] dies
Local Variables
Conditions
Actions
UI - Display "Building Died!" for (All players) to Subtitle area
General - If (Conditions) then do (Actions) else do (Actions)
If
Or
Conditions
(Unit type of (Triggering unit)) == Supply Depot
(Unit type of (Triggering unit)) == Supply Depot (Lowered)
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in (Any units in (Region((Position of (Triggering unit)), 35.0)) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) >= 1
Then
Variable - Set Position[1] = (Region((Position of (Triggering unit)), 1.0))
Variable - Set Structure[1] = (Triggering unit)
Else
Unit - Order (Random Living unit from Builders[1]) to (SCV - Build Supply Depot targeting (Center of (Region((Position of (Triggering unit)), 1.0)))) (Replace Existing Orders)
Else
The basic of this trigger pretty much says if a building is killed, and there is no enemy units withing a radius of 35, then rebuild. If there is units within that radius, store the unit and it's position into a variable so it can be rebuilt when there is no units within the area.
What I need help with, besides the questions I asked above this trigger, is how do I do the "THEN" conditions to where it stores the unit and it's position into a variable, not having to do an array value for each individual structure on the map?
Also, I already tired making the event be if ANY unit dies and setting a condition in an if statement to be the actualy pre-placed building on the map, but the trigger doesn't fire. It seems that in order for the map to register that building, it has to be in the event heading.
How do I simplify this, because I really do NOT want to have to make a array value for each building.
Why not use the event "A Unit Dies" and use the Condition to check if the unit is a building. You can use the "Or" condition to make it so multiple building types can trigger.
If you read the post, I said it has to be the specific building that dies in the event trigger. If you look @ the trigger I made it's setup so it stores the building into a variable and it's position to build @ at a later time if there is an army nearby.
I have no idea if that work work either, I know the ai rebuilds them, but that still defeats what I want to accomplish. If this worked, it would force the AI to build the building regardless if there was an enemy army nearby.
There has to be a way to not have to store every single building and it's position into an array value. Someone's gotta know how
This is done in the final Protoss mission. There are triggers to recreate spore and spine crawlers if you happen to kill them off. The triggers are already set for the map if you open it up and take a look.
There is two triggers associated with the AI regarding this:
If you pre-place a building on the map and un-check the "initially created" option in the AI tab you have an option here to pick the rebuild count for that specific building as well.
There is these options:
Never / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / Always / Default (Never/Never)
What I don't understand is how to get the computer to actually REBUILD these structures if they die. I have all the pre-placed buildings set to always and even have the triggers above enabled. I've tried changing all of those numbers and nothing gets the computer to rebuild them. There is a check mark under which difficulty they should re-build it under and the only one is very easy as that's all there is. Does someone know how to make another difficultly option that you could set that too?
Now since I couldn't figure out to get this crap to work, I decided to make a trigger system instead.
Here it is:
The basic of this trigger pretty much says if a building is killed, and there is no enemy units withing a radius of 35, then rebuild. If there is units within that radius, store the unit and it's position into a variable so it can be rebuilt when there is no units within the area.
What I need help with, besides the questions I asked above this trigger, is how do I do the "THEN" conditions to where it stores the unit and it's position into a variable, not having to do an array value for each individual structure on the map?
Also, I already tired making the event be if ANY unit dies and setting a condition in an if statement to be the actualy pre-placed building on the map, but the trigger doesn't fire. It seems that in order for the map to register that building, it has to be in the event heading.
How do I simplify this, because I really do NOT want to have to make a array value for each building.
No one knows?
.... Come on guys
Why not use the event "A Unit Dies" and use the Condition to check if the unit is a building. You can use the "Or" condition to make it so multiple building types can trigger.
You could try making the structure a "bully". It's done by a trigger action under the AI tab. I have absolutely no idea if that will work, though. >.>
@Roar_Man: Go
If you read the post, I said it has to be the specific building that dies in the event trigger. If you look @ the trigger I made it's setup so it stores the building into a variable and it's position to build @ at a later time if there is an army nearby.
@Biophysicist: Go
I have no idea if that work work either, I know the ai rebuilds them, but that still defeats what I want to accomplish. If this worked, it would force the AI to build the building regardless if there was an enemy army nearby.
There has to be a way to not have to store every single building and it's position into an array value. Someone's gotta know how
I'm very intrested to find a way to do this thing too.
This is done in the final Protoss mission. There are triggers to recreate spore and spine crawlers if you happen to kill them off. The triggers are already set for the map if you open it up and take a look.
TZeratul04.SC2Map
"In Utter Darkness"