HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Pre-built bases

05-05-2003, 05:14 PM#1
Fenris Ulf
Scenario:
I'm developing a mod that is attempting to remove the "overhead" of base management. To do so, each player starts with a base already built and ready to pump out units. The base consists of one of every building so they can chose to train any type of unit and build any kind of upgrade.

Question:
Is it possible to build a map with pre-built bases that will "change" depending on the race selected? (I doubt it.) If not, is it possible to allow the player to instantly build all of his/her buildings at the begining of the game without "peons"? (I don't want them to be able to build more than one of each building and I don't want them to be able to repair buildings either.) And if the player is allowed to select the location of their buildings, is there a way to limit the area they can use? (The players base must be located in a particular region.)
05-05-2003, 05:47 PM#2
AIAndy
Yes you can do that. Just don't place the buildings with WE. Instead use triggers to place the buildings. Then you can just place different ones depending on the race of each player. If you are too lazy to do that yourself but have some knowledge in JASS, you can place the buildings with WE, save and then take the code for placing the buildings out of the map script.
05-05-2003, 06:04 PM#3
Guest
The only way I would know how to do this would be to make 4 Unit Group arrays (one for each of the races).

Assign each building you want to be available to the group array on map initialization:

Events: Map initialization
Conditions: NONE
Actions:
Set HUBuildings[0]=Castle
Set HUBuildings[1]=Farm
Set HUBuildings[2]=Alter of Kings
etc.
etc.
Set OrcBuildings[0]=Fortress
Set OrcBuildings[1]=Orc Burrow
etc.
etc.

Then in another trigger:

Events: Map Initialization
Conditions: NONE
Actions:
If ((Race of Player 1 (Red)) Equal to Human) then do (For each (Integer A) from 0 to 8, do (Unit - Create 1 HUBuildings[(Integer A)] at (Random point in Region 000 <gen>) facing Default building facing degrees) else do nothing

Repeat If/Then/Else statement for each Race with corresponding Array

I did Region 000 <gen> instead of player start location just so you had a bigger spread of your buildings instead of lumping them all really close.

Hope that helps...
05-05-2003, 06:06 PM#4
Fenris Ulf
Could you expand on that a little bit? How would one use triggers to build an entire base?
05-05-2003, 06:43 PM#5
Guest
who exactly are you referring to? I can explain more in depth if need be...
05-05-2003, 06:50 PM#6
Fenris Ulf
My request for more info was directed at AIAndy. We must have posted at nearly the same time.

I'll give your suggestion a try. It looks pretty straightforward. Thanks.
05-05-2003, 06:54 PM#7
Guest
Not only is it straightforward, it also works! ;)

I just tested it out to make sure because I was curious myself. I have a test map if you run into any problems I can just post it here. Have fun!
05-05-2003, 06:57 PM#8
Starcraftfreak
1) Create some locations where the buildings should be created.
2) According to the chosen race create the buildings and starting units.