This (in my mind) would preferably have the *building* that is being constructed as the "Triggering unit". But alas, the triggering unit is actually the builder. So if I want to have a condition in there to disallow the building from constructing, I can't just say Remove (Triggering unit) because then my builder gets removed (which I really don't want).
If I change the event to "Unit - Any Unit construction is Resumed", or "Completed" or any other options, nothing at all will happen. Outputting a message in the actions will show that for "Started" the triggering unit is builder, but for "Resumed" the event occurs at the same time as "Started", but has no Trigger Unit, and for "Completed" the triggering unit is empty as well (And gives me errors when I try to do other things with the 'triggering' unit, like refund the cost to the player, for instance).
What's a good way for me to conditionally prevent a structure from being built? (No, I can't just add it to the data editor in Requirements - this is a region-specific requirement. IE. "Does this region already have a structure of type X in it? - can't build anymore!"). This is somewhat annoying :(
The event "Unit is created" may be what I was looking for (Triggering unit is the creator, Created Unit is the unit being created - and it fires when a building construction begins)
But going along with that, maybe for the Unit Construction Progress there should be a "Constructing Unit" in addition to the "Triggering Unit"? Because it's still difficult to capture the unit during other parts of it's construction lifecycle (for instance: Complete).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This event doesn't seem to send a very sane unit to the [Triggering Unit] function. observe:
This (in my mind) would preferably have the *building* that is being constructed as the "Triggering unit". But alas, the triggering unit is actually the builder. So if I want to have a condition in there to disallow the building from constructing, I can't just say Remove (Triggering unit) because then my builder gets removed (which I really don't want).
If I change the event to "Unit - Any Unit construction is Resumed", or "Completed" or any other options, nothing at all will happen. Outputting a message in the actions will show that for "Started" the triggering unit is builder, but for "Resumed" the event occurs at the same time as "Started", but has no Trigger Unit, and for "Completed" the triggering unit is empty as well (And gives me errors when I try to do other things with the 'triggering' unit, like refund the cost to the player, for instance).
What's a good way for me to conditionally prevent a structure from being built? (No, I can't just add it to the data editor in Requirements - this is a region-specific requirement. IE. "Does this region already have a structure of type X in it? - can't build anymore!"). This is somewhat annoying :(
Maybe I was too quick to judge there ;)
The event "Unit is created" may be what I was looking for (Triggering unit is the creator, Created Unit is the unit being created - and it fires when a building construction begins)
But going along with that, maybe for the Unit Construction Progress there should be a "Constructing Unit" in addition to the "Triggering Unit"? Because it's still difficult to capture the unit during other parts of it's construction lifecycle (for instance: Complete).