Which event is triggered when a barbarian encampment is cleared?

r2d2

Chieftain
Joined
Aug 23, 2012
Messages
20
Hi,

I am looking for the GameEvents that is triggered when a barbarian encampment is cleared (something similar to GameEvents.CityCaptureComplete() ).

I went through the wiki, unfortunately I found nothing.

Thanks in advance,

R2d2
 
There doesn't seem to be any lua event called when barbarian camps are cleared.
 
Thanks,

Sad there is not a such lua event.

I would like to design a small mod where when a player clears a barbarian camp, a production bonus is affected to the Capital of the player.

Do you think there is any workaround?

r2d2
 
There is no clean way to detect when a barb camp is cleared nor is there a way to workaround it with only lua. There is no event you can use (the improvement destroyed event is UI related, not game play related) and trying to calculate where camps are and polling each turn to see if they are gone is full of corner cases (ranged attack kills the unit but not the camp, expanding city tiles clears the camp but not the unit, etc).

You can do it with a custom dll but that is probably not worth it.
 
UnitSetXY fires before or after a camp is cleared ?
 
Ok I think I will get over it :(

Instead I will give the production bonus when a barbarian units is killed.
 
Back
Top Bottom