Well, I'm sure I totally wrong in my script, but I wonder if someone could at least try to understand what I'm trying to do with what I wrote. Free style 
SerialEventUnitDestroyed is in Event list in ModBuddy (http://wiki.2kgames.com/civ5/index.php/Lua_Game_Events), so could it be used to be attached to a civilization, and then with a specific unit?


Spoiler :
function OnUnitDestroyed (Player, Civ, Unit, Plot)
if Players[Game.GetActivePlayer()]:GetName() == "Amanishakheto" then
if UnitDestroyed:GetCivilizationType() == GameInfoCivilizations["CIVILIZATION_BARBARIAN"] then
-- Add 1 Slave to player
AddNewUnit( player, "UNIT_SLAVE", plot:GetX(), plot:GetY() );
UserEventMessage( Locale.ConvertTextKey( "TXT_USER_EVENT_UNIT_CAPTURED_BY_NUBIA" ) );
end
UI.AddPopup(popupInfo);
end
Events.SerialEventUnitDestroyed.Add( OnUnitDestroyed );
if Players[Game.GetActivePlayer()]:GetName() == "Amanishakheto" then
if UnitDestroyed:GetCivilizationType() == GameInfoCivilizations["CIVILIZATION_BARBARIAN"] then
-- Add 1 Slave to player
AddNewUnit( player, "UNIT_SLAVE", plot:GetX(), plot:GetY() );
UserEventMessage( Locale.ConvertTextKey( "TXT_USER_EVENT_UNIT_CAPTURED_BY_NUBIA" ) );
end
UI.AddPopup(popupInfo);
end
Events.SerialEventUnitDestroyed.Add( OnUnitDestroyed );
SerialEventUnitDestroyed is in Event list in ModBuddy (http://wiki.2kgames.com/civ5/index.php/Lua_Game_Events), so could it be used to be attached to a civilization, and then with a specific unit?
