You could also use the conditional_button.IsHoldingItem[]
method
# Returns if the `Agent` is currently holding the item stored at `KeyItemIndex`.
IsHoldingItem<public>(Agent:agent, KeyItemIndex:int)<transacts><decides>:void
Once you find the index, you could call conditional_button.SetItemCountRequired(Index, 1)
and then conditional_button.Activate(Agent)
the button needs to consume items. (finally you reset the button by calling conditional_button.SetItemCountRequired(Index, 0)
)
Problem with this is that conditional_buttons
can only contain 3 items, so you’d need to do this many times
I also never done this so I’m not sure if it would work