Ok here's a little problem for everyone. Basically when the code below runs the game stops/slows down for a couple of minutes and then returns to normal.
Basically what I want the SLIC to do is when a city is built, for my War Chief unit to be built with it and for the city the unit is built in to be stored so that I can find out the units home city in the future.
The line that is messing things up is:
I don't think this part even works so what am doing wrong? (I haven't been using SLIC very long if you haven't already guessed)
All I want to be able to do is get the home city of the unit when I want.
I hope some of that made sense
.
HandleEvent(CreateCity) 'HomeCity' post {
city_t tmpCity;
unit_t tmpUnit;
location_t cityloc;
tmpCity = city[0];
int_t homecity[];
int_t tmpPlayer;
tmpPlayer = player[0];
cityloc = location[0];
CreateUnit(player[0], UnitDB(UNIT_WAR_CHIEF), cityloc, 0);
homecity[tmpUnit] = tmpCity.name;
message(tmpPlayer, 'five');
}
city_t tmpCity;
unit_t tmpUnit;
location_t cityloc;
tmpCity = city[0];
int_t homecity[];
int_t tmpPlayer;
tmpPlayer = player[0];
cityloc = location[0];
CreateUnit(player[0], UnitDB(UNIT_WAR_CHIEF), cityloc, 0);
homecity[tmpUnit] = tmpCity.name;
message(tmpPlayer, 'five');
}
The line that is messing things up is:
homecity[tmpUnit] = tmpCity.name;
All I want to be able to do is get the home city of the unit when I want.
I hope some of that made sense

Comment