My favourite way would be :
If Bucket = Full (instance variable Full set to true perhaps)
Cond: Pick bucket by unique ID (ID of relevant bucket)
Sub event: Pick gate by unique ID (ID of related gate)
Do Action (like move gate, play anim of gate whatever it is you're doing)