Another way is to notice that the button click transitions to a new state, on Entry to that state you could set a field to indicate to an existing UE script that the button has been clicked. The UE script could check that field's value beforeLoad or whenever needed, and clear the field again to prevent performing the action again, if desired.