So I’ve been looking at these problems, and here are my findings. Everything here applies to the imperial age. All these comments are what I think is happening with the game, I could be wrong on a few points, but if you can solve any of these then you would make quite a few people happy.
If you change the hp on a gate (extra hp or less hp), when the gate opens, (IE a unit walks under the gate) the game engine changes the gate for an open one, unfortunately this “open gate” doesn’t have its hp altered so when it closes again the hp calculations conflict and seem to cause the gate to damage it’s self or the hp raises beyond all reasonable numbers! So the result from this is that hp on a gate can never be changed.
If you change the name on a gate when it opens, again a new open gate is placed and the name changes back to Gate. The way around this is to name the gate with a looping trigger, thus the gate keeps getting renamed, or lock the gate so it can’t open.
If you change the ownership of a gate, and the game is reloaded during play, again the gate damages its self. This is because after the game has reloaded, when the gate opens the game engine places a non fortified gate as the open one and changes the hp from 4000 to 2750, thus taking us back to the problem above about changing hp on gates.
There are 4 solutions I’ve found for this:
1: Thanks to Scenario_T_C. Heroize the gate, this stops it from self-destructing but not from burning and spoiling the look of things. (Unless you want a burning gate)
Trigger 1 start on looping on
Damage Object: - 1
Damage Object: - 16773216
Damage Object: - 16773216
There is a problem with this, When the gates change hp the self healing calculations are no longer correct, therefore it’s possible for the gates to go over 4000 hp. Although in Sabato they open and close that much it never seems to go over.
2: Remove the gate and place a new gate for the new owner, this prevents the use of some triggers after the event, I.E. object selected, lock gate, unlock gate, object visible etc.
3: Make the gate with 0 hp, this means it can’t be destroyed without the use of triggers.
But this could be used where destroying is not needed.
Trigger 1 start on looping off
Change object HP -4000
Damage object -4000
Change object HP 4000
Damage object 4000
4: Disable fortified wall technology. Then instruct the player to save and reload the game at the start. This solves the problem completely, but it stops you from having fortified walls and seems odd to the player, because the first thing he’s told is to reload.
Finally, one thing I see so often and can cause all sorts of problems, even crashing. If you test the game from the editor and save while testing, the game seems to add gate pillars under the gate, always test for this by moving the gate and looking to see if there are any gate pillars. They look like wall ends with a flag on top. Always delete these then put your gate back. One scenario I made had fifty of these pillars, and it seemed to take forever, pressing delete to remove them.