Post 13 Jun 2013, 13:41 by Lewin
			
			
			Try testing which part is not working. Put this line somewhere and you will get a message when the game reaches that code:
Actions.ShowMsg(-1, 'Test');
So for example, put it inside the if-statement with your CoverCircle commands and then you'll get a message when that code is run. You can also test values of things. For example try this line before your if-statement:
Actions.ShowMsg(-1, 'ID: '+IntToStr(aHouseID)+' tower ID: '+IntToStr(States.HouseAt(81, 153)));
Then you can see the IDs of the two houses it's trying to compare. Tell me what the IDs are when the tower is destroyed and maybe I can help you further.
By the way, your code will only work if the tower is owned by player 2, since you Exit if it's not 2.