I have a bunch of actors of the same type that are practically speaking just buttons, and a bunch of “level sequences”. What I need is to let a specific button trigger a specific “level sequence” (you trigger button A, it animates door A, you trigger button B, a bunch of rocks fall down, ect).
With my understanding that “level sequences” can only exist in the context of a level, my initial thought was to use a enum with a list of all the “level sequences”, and assign one to each button inside the level “Event Begin/Play”. From there I would have pushing a button would pass its enum into a event dispatcher, and have a listener in the level, which would then switch on enum to trigger the correct “level sequence”.
Beyond the fact that I cant seem to figure out how to trigger a listener from within a actor, best I can tell listeners cannot take values like normal events so I am at a bit of a loss how to solve this problem.
If anyone has a solution to this problem I would greatly appreciate it.