Yes. In general, I have events delegate to a project script function. (Event is just a one-liner passing event information as function arguments.) A project script can define lists and dictionary variables outside a function that will persist in gateway memory between project saves. You can add/remove dictionary keys, iterate over the dictionary, et cetera, and the dictionary will hold the values between events.
2 Likes