Hi guys,
I'm working on a fort mod similiar to Geekob's Enhanced Forts but with some different functionality. Upon pillaging an opposing player's fort, I am trying to give control of that fort and the appropriate surrounding tiles to the player who pillaged it. I am doing this by giving ownership of the fort PLOT to the player, not the improvement. (plot:SetOwner(player))
Using this method, the player who pillaged it and took control of the plot is still able to repair the fort. My problem arises when an event such as ImprovementRemovedFromMap() or ImprovementChanged() are called. Both of these functions use the parameter improvementOwner, and that is always set as the player who originally placed the fort.
Does anyone know how to change ownership of the improvement itself? Is it a problem with how I am setting the plot ownership? Does this miss an event hook that should be changing the improvement owner?
Thanks in advance
I'm working on a fort mod similiar to Geekob's Enhanced Forts but with some different functionality. Upon pillaging an opposing player's fort, I am trying to give control of that fort and the appropriate surrounding tiles to the player who pillaged it. I am doing this by giving ownership of the fort PLOT to the player, not the improvement. (plot:SetOwner(player))
Using this method, the player who pillaged it and took control of the plot is still able to repair the fort. My problem arises when an event such as ImprovementRemovedFromMap() or ImprovementChanged() are called. Both of these functions use the parameter improvementOwner, and that is always set as the player who originally placed the fort.
Does anyone know how to change ownership of the improvement itself? Is it a problem with how I am setting the plot ownership? Does this miss an event hook that should be changing the improvement owner?
Thanks in advance