September 21, 2001, 01:48
|
#1
|
Settler
Local Time: 08:39
Local Date: October 31, 2010
Join Date: Aug 2001
Location: nowhere
Posts: 10
|
I have a ?
I have recently attempted to create colonies in my game. The actual cities and the unit to settle them were easy enough, but now I want to make it so that some buildings can't be built in a Colony. The question is, how do I add a new string like the "cantbuildinsea" that keeps things like airports from being built underwater? Is there any way? Any help would be greatly appreciated.
|
|
|
|
September 21, 2001, 10:24
|
#2
|
King
Local Time: 10:39
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
|
The best was going to make a slic operation. But i neither know if it is possible nor if someone wants to make it.
How does you colonies work? Are you using the idea i post some weeks a go?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
|
|
|
|
September 21, 2001, 13:42
|
#3
|
Settler
Local Time: 08:39
Local Date: October 31, 2010
Join Date: Aug 2001
Location: nowhere
Posts: 10
|
Not exactly. I wanted to create a city that would grow (although slowly) and build most buildings and units. However, I wanted to disable certain buildings like a capitol (most empires don't build a capitol in a colony). I'm rather rusty on my programing so the slic files might as well be in greek to me.
|
|
|
|
September 22, 2001, 02:16
|
#4
|
Prince
Local Time: 14:39
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
I don't know if this will work, but its the only thing I can think of for now...
Code:
|
int_f mod_CanCityBuildBuilding(city_t theCity, int_t theBuilding)
{
if(theCity == UnitDB(UNIT_COLONY)){
if(theBuilding == BuildingDB(IMPROVE_AIRPORT)
|| theBuilding == BuildingDB(IMPROVE_GRANARY)){
return 0; // you cant build
}
else { //otherwise
return 1; // you can
}
}
else { // if its not a colony
return 1; // it can build anything
}
} |
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
|
|
|
|
September 25, 2001, 21:11
|
#5
|
Settler
Local Time: 08:39
Local Date: October 31, 2010
Join Date: Aug 2001
Location: nowhere
Posts: 10
|
Thanks for the help. Ummm.... by the way, which slc file does this go into, not to sound like a retard or anything.
|
|
|
|
September 26, 2001, 10:02
|
#6
|
Prince
Local Time: 14:39
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
If you aren't running the MedPack, put it in script.slc or scenario.slc.
If you add it to the MedPack, it may give some errors but that can be solved if you need (and if it works, I'm still not convinced...)
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 09:39.
|
|