As the title says, i want to trigger an event to fire when you click to build a ship.
To demonstrate what I am trying to do.
Lets say I have 4 ship types. I only ever want to have one of those 4 ship types able to exist at a time.
currently I have it scripted so that once one of those 4 ships is built it removes the other 3 from the build list so they can't be built and makes them available again if the existing ship is disbanded/destroyed.
However, if I queue up all 4 ships. It will still build all 4 as long as they were queued before the first one was built.
So what I am trying to do is essentially disable the other ship designs the moment one of them is queued to be built (and restore them if the queue is cancelled).
There seems to be an on_action event for planet buildings like this, but I don't see one for ships. (That functionality has to exist somewhere, because if you limit a ship size to 1 per empire the moment you queue it and look at the fleet info it marks it as 1/1.)
To demonstrate what I am trying to do.
Lets say I have 4 ship types. I only ever want to have one of those 4 ship types able to exist at a time.
currently I have it scripted so that once one of those 4 ships is built it removes the other 3 from the build list so they can't be built and makes them available again if the existing ship is disbanded/destroyed.
However, if I queue up all 4 ships. It will still build all 4 as long as they were queued before the first one was built.
So what I am trying to do is essentially disable the other ship designs the moment one of them is queued to be built (and restore them if the queue is cancelled).
There seems to be an on_action event for planet buildings like this, but I don't see one for ships. (That functionality has to exist somewhere, because if you limit a ship size to 1 per empire the moment you queue it and look at the fleet info it marks it as 1/1.)