The easiest way would be to have a global variable boolean (true or false) to say whether you've placed the woodcutter yet. Put this at the top of your script (outside of any procedures):
var PlacedWoodcutter: Boolean;
Then in OnMissionStart put this line:
PlacedWoodcutter := False;
Then in OnHouseBuilt add this:
- Code:
if (States.HouseType(aHouseID) = 14) and not PlacedWoodcutter then
begin
PlacedWoodcutter := True;
//Your code to place woodcutters goes here
end;
"not PlacedWoodcutter" is just a neat was to write "(PlacedWoodcutter = False)"
How it works:
1. At the start of the mission, PlacedWoodcutter is set to false
2. When we notice the AI finishes a quarry, we check PlacedWoodcutter
3. If PlacedWoodcutter = True, we do nothing
4. If PlacedWoodcutter = False, we place the woodcutter and set PlacedWoodcutter to True, so when the next quarry is built, it will not place the woodcutter again.
And that's how you use global variables. They will store values for you which you can use from any place.