I want a tech requirement to be fulfillable by allied players of the player. So if my ally has X building, I can build anything that requires X building.
Make it a dummy requirement instead of an actual building requirement, and check periodically for any player having the building, and add/remove the requirement accordingly
You shouldn't use periodic triggers if you can avoid it. Make a trigger when a unit construction progress is completed and then enable the dummy requirement if the unit type matches. Likewise, when a building is destroyed, check if there are any more of those buildings left and if not, disable the requirement.
Maybe there's a way to do this with data editor but I don't know about that.
You could make the requirements check for a corresponding upgrade instead and every time a tech structure is finished you can give the upgrade to the owner of the trigger unit and his allies.
I want a tech requirement to be fulfillable by allied players of the player. So if my ally has X building, I can build anything that requires X building.
Make it a dummy requirement instead of an actual building requirement, and check periodically for any player having the building, and add/remove the requirement accordingly
You shouldn't use periodic triggers if you can avoid it. Make a trigger when a unit construction progress is completed and then enable the dummy requirement if the unit type matches. Likewise, when a building is destroyed, check if there are any more of those buildings left and if not, disable the requirement.
Maybe there's a way to do this with data editor but I don't know about that.
You could make the requirements check for a corresponding upgrade instead and every time a tech structure is finished you can give the upgrade to the owner of the trigger unit and his allies.
@Siretu: Go
This is exactly what I ended up doing and it worked out great. Thanks!