Really? Have a look at some of the slic mods in the downloads section. I'm pretty sure user variables are used in messages there like [var.value].
mines on oil goods
What you can do is reset the unit's moves, then you can deduct just enough movement based on unit type. How do you reset the unit's moves? I guess you could kill it and create a new one (with the same HP if damaged, or veteran).
messagebox 'OilResourceandRefinaryCount' {
Abort();
aCity = 0;
oilResource = 0;
refCount = 0;
while(aCity < player.cities) {
SetCityByIndex(1, g.player, aCity);
oilResource = oilResource + CityCollectingGood(city.1,5);
if(CityHasBuilding(city.1, "IMPROVE_OIL_REFINERY")) {
refCount = refCount + 1;
}
aCity = aCity + 1;
}
oilProduction = oilValue * oilResource + refValue * refCount;
}
messagebox 'OilInfo' {
Message(g.player, 'OilResourceandRefinaryCount');
Message(g.player,'MaintenanceCost');
Text(ID_OIL_INFO_A);
Title(ID_OIL_INFO_TITLE);
MessageType("BOMB_CABINET");
}
Trigger 'OilInfoButton' when (key.1.pressed)
{
//Triggers OilInfoScreen
Message(g.player, 'OilInfo');
}
Trigger 'OilisGood' when (IsHumanPlayer(g.player)) {
//variable resets
warning = 0; //warning message
oilCount = 0;
check = 0; //for 'movingisbad' trigger
//Calculates Unit Oil Maintanence Cost
Message(g.player, 'MaintenanceCost');
//Counts Oil Resources and Refinaries, then reports total oil to player
Message(g.player, 'OilResourceandRefinaryCount');
//Calculates oil each player has at beginning of their turn
Message(g.player, 'turnStartOil');
//Punishment for not having enough fuel at beginning of turn to cover Maintanence Costs
Message(g.player, 'BeginTurnPunishment');
//Oil Info Message
Message(g.player, 'OilInfo');
}
Comment