Thread Tools
Old March 11, 2001, 11:22   #1
Steph
Chieftain
 
Local Time: 09:56
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Mazamet, France
Posts: 32
Request help from SLIC expert
As using 2 different tech in EnableAdvance for units doesn't work, I have tried to use SLIC.

Here is the code.

int_f mod_CanCityBuildUnit(city_t theCity, int_t theUnit)
{
if (theUnit == UnitDB(UNIT_LEGION))
{
if(HasAdvance(theCity.owner, AdvanceDB(ADVANCE_MILITARISM)))
{
return 1; // can build this
}
else
{
return 0; // can't build this
}
}
if (theUnit == UnitDB(UNIT_HUNTER))
{
if(HasAdvance(theCity.owner, AdvanceDB(ADVANCE_WHEEL)))
{
return 1; // can build this
}
else
{
return 0; // can't build this
}
}
return 1; // can build all other units
}

This way, legion should be buildable only if the player has the techs militarism and iron working (iron working is used in the unit.txt with EnableAdvance, and militarism via SLIC).

Trouble is :
- Legion can appear in the buildable units list as soon as I discover Iron Working. But they do not appear every time ! ("random" behaviour every time you open the build list of the city). When I try to add the unit, it is not added in the list... Most of the time... If I click fast enough, I can add some legions in the lists (like 2 legions if I click 10 times...).

How can I make it work??
Steph is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:56.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team